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!

Invoking Same Subform from Two or More Forms

Status
Not open for further replies.
May 7, 1999
130
US
Hi!

I think I've got an easy one: I have a main form and a subform that work just fine. On the main form I have a command button that invokes the subform. In the subform is a query that refers back to the main form to pick up selection criteria. All's well.

Now, I want to use the same form from another mainform, but I need to change not only the reference in the query for the subform not only because it's a different main form, but also because I want to specify different criteria.

I presume I can do this with VBA and SQL; however, there may be a simpler way to specify the different criteria. Is this a place for using "parent"? In my simplest case, all I need for the criterion in the query is to refer to a differently named control on the main forms to pick up the product ID. (Yes, I could possibly just rename the controls on the two different main forms; however, I think I want to solve the more general case.)

Hope you can help.

Thanks,



John Harkins
 
Just add a subform to each of the forms with the same name and same souorce object as the original form. Piece of cake!!!

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top