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

Sunform and filters

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
584
GB
I have sucessfull embedded a subform into my main form, but now queries, which i want to run on my subform do not work. Even if i use the filter off the main taskbar, this asks for futher parameters. What do i need to do?

The subform is linked and displaying the correct data, but filters will not work. Any ideas?
 
When you embed a sub form into a main form, the naming pattern changes i.e., you can't just refer to the sub form directly. To refer to the sub form, you will do something like this:

forms!frmmainForm.frmSubForm!iteminsubform

Hope this works

Peace,

me2you
 
Try this syntax to retrieve the value of a control in a subform:
Forms![name of main form]![name of subform's control].Form![name of control]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
This also works from the main form...

When referencing an object on the subform....
Me.YourSubFormName.Form.YourField

For example:
Me.YourSubFormName.Form.YourChildField = Me.YourParentfield
or
Me.YourSubFormName.RecordSource = strSQL1


When referencing to the subform object method or property...
Me.YourSubFormName

For example:
Me.YourSubFormName.Requery

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top