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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SubForm record source

Status
Not open for further replies.

MartinF

Technical User
Sep 19, 2000
143
0
0
FR
Hi,

Please could anyone tell me how i go about altering the record source SQL statement of an open SubForm in VB?

I can do it for a normal form by using:

forms![FromName].recordSource = SQL statement

but i cannot seem to apply this to a SubFrom.

Any help would be greatly appreciated.
 
Forms!frmMainForm!ctlSub.Form.RecordSource = SQL statement

where...

frmMainForm is the name of the main form
ctlSub is the name of the subform control on the main form

Shep
 
Cheers mate, thats just the job!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top