How to call a form from multiple locations in Access 2007?Locked
I created an application in Access 2007 that allows a user to look up account information either with account number, name or address. All of these ultimately display the same group of forms and subforms. Those forms and subforms display the data by running queries using parameters passed by the calling form i.e. [FORMS]![frmAcctNumber].[txtAcctNumber]
The question is this. If the look up by name or address, there is an intermediate step because they get a list of similar names and they chose a record which passes the account number to the same screen as the look by account number screen. But the criteria is different. Instead of [FORMS]![frmAcctNumber].[txtAcctNumber] it is now [FORMS]![frmName].[txtAcctNumber] or [FORMS]![frmAddress].[txtAcctNumber] . Right now I have this working by have the different look up methods call different but identical forms that use different queries. This seems like a nightmare to maintain. I tried to have one query that uses OR in the criteria but when I do this, I always get a pop asking for the value from the look ups I’m not using, meaning if I look up by Account Number, the application asks me for the value for Names and Address ([FORMS]![frmName].[txtAcctNumber] or [FORMS]![frmAddress].[txtAcctNumber] ). How do I get around this?