Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform Recordsource 1

Status
Not open for further replies.

georgp

Technical User
Mar 28, 2002
96
US
Help wanted!
Today is obviously not my day....
I'd like to set the recordsource of the subform frm_CustOpporSub3 in the VBA code of the mainform frm_CustOppor:

Forms!frm_CustOppor!frm_CustOppor3.Recordsource = frm_CustOppor.Recordsource

I also tried other variations. Always error messages - either the object does not support the method, type mismatch or whatever.

I hope, someone can help me before I go home...

Thanks in advance, georgp
 
Try this syntax

Forms!frm_CustOppor!frm_CustOppor3.form.Recordsource = frm_CustOppor.Recordsource
 
Thanks Fancy Prarie,

ACCESS's comment is: Can't find the field 'frm_CustOppor3' referred to in your expression. Tried the same by using

Forms!frm_CustOppor.frm_CustOppor3.form.Recordsource = Me.Recordsource

instead of your suggestion

Forms!frm_CustOppor!frm_CustOppor3.form.Recordsource = Me.Recordsource

but also no luck: Application defined or object-defined error.

I continue to try, but if you have identified the point, please let me know.

Thanks again, georgp
 
Syntax should look like this:

Forms!MainFormName!SubformControlName.Form.RecordSource = Whatever
 
FancyPrairie,

you were right the first time. Sorry to have bothered you again. Some typo from my side. Enjoy the star...

georgp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top