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!

filtering subform programatically

Status
Not open for further replies.

bblekfeld

Programmer
Mar 9, 2004
49
US
DoCmd.OpenForm "OpenIssuesDualForm", acViewNormal, "", "[Forms]![OpensIssuesDualFormQuery].Form![Support Contact]=[Forms]![Open Issues Dialog]![SelectEmployee]"


I am trying to prefilter data with a form "Open Issues Dialog" that has you select ALL or choose from a list of employees. Then on the ONCLICK event of a button, the code is run. The form that opens as a result is a blank form with two subforms that have a parent child relationship. The parent subform is what I am trying to filter but it is not working. The form opens but I think because it's a subform that I am trying to filter, and not the main form, nothing happens. Or am I using the wrong syntax. Please help.

Thanks!!
 
Hallo,

Why not pass the subform filter info in the OpenArgs, then set up the subform recordsource in the form_open event?

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top