JohnHarkins
MIS
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
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