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

accessing subfrm1 to subfrm2 to requery

Status
Not open for further replies.

AT76

Technical User
Apr 14, 2005
460
US
Hello,

Thanks for all your help thus far.

I'm trying to access a subForm from another subForm.

SubForm1 (currently in this subform)
SubForm2 (need to requery)
MainForm

Apparently my syntax is not correct. Here's what I have on my ONCLICK event in SubForm1:
Code:
Me!SubForm1.MainForm!SubForm2.MainForm.RecordSource = "SELECT Courses.Course_Name FROM Courses WHERE Courses.Course_Name= VALUE"

Me!SubForm1.MainForm!SubForm2.MainForm.Requery

Is this correct?
 
Forms!MainForm!SubForm2.Form.RecordSource = "SELECT Course_Name FROM Courses WHERE Course_Name=VALUE"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top