jwcolby
jwcolby at colbyconsulting.com
Tue Jan 12 08:07:26 CST 2010
Darren, > You can then still reference the items on the calling form (Even if it's invisible) True. In general I do not like referencing controls on forms. Doing so ties me to a specific form, with a specific control name, and a specific form name. If any of that changes or goes away the program breaks. I developed a generic solution using ... (you guessed it) a class which can be used "standalone" in the called form. This class reads out any OpenArgs passed in to the form, and processes them, placing them into a collection for ready use. By passing in openargs I can open the form without any calling form (for troubleshooting), I can open the form from a function which passes in variables, or even open the form from several different forms. In order to implement my system I use the fairly standard MyVarName1=MyVarValue1;MyVarName2=MyVarValue2;Etc;Etc; Now my class splits out the "variables", and places MyVarValueX into a collection keyed on MyVarNameX. Then the opening form can just ask the class for the variable named MyVarName1 and back comes the passed in value MyVarVal1 etc. To see (and even use) my class, go to http://www.databaseadvisors.com/downloads.asp Second from the top. John W. Colby www.ColbyConsulting.com Darren - Active Billing wrote: > Hi john > > I'm coming into this thread very late and this has probably already been > mentioned. The calling form can be made invisible by using something like > Me.Visible = false > in the calling code. > You can then still reference the items on the calling form (Even if it's > invisible) > Then have any resulting popup form set to modal (so not a lot of navigation can > occur) and then include some code to make the calling form visible in the > closing code of that popup > > Darren