Drew Wutka
DWUTKA at marlow.com
Tue Mar 11 13:03:00 CST 2003
Don't be confused. Forms are class modules. When you use the Public statement within a class module (such as a form), you are creating a property, NOT a global variable. Public only creates a global variable when placed within the declarations of a standard module. Drew -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Tuesday, March 11, 2003 7:38 AM To: accessd at databaseadvisors.com Subject: Re: Re: [AccessD] Public variable losing contents Got around it, but I can't see why....... I was declaring the variable public inside the startup form, I removed it from the startup form and placed it inside a module same as before public pubCallingForm and it now works fine and thats the only change I made......CONFUSED....... Paul From: "Bryan Carbonnell" <carbonnb at sympatico.ca> Date: Tue 11/Mar/2003 13:11 GMT To: accessd at databaseadvisors.com Subject: Re: [AccessD] Public variable losing contents On 11 Mar 2003 at 11:32, paul.hartland at fsmail.net wrote: > fields on the calling form. But when the special pay rates form is > called, pubCallingForm is set back to null. > > Anybody have any idea as to why this is happening ? Paul, Put a Watch on the variable pubCallingForm, making sure the context is set to all procedures and all modules. You can set the watch to stop the code when the value changes, so you can see where the value is being changed. -- Bryan Carbonnell - carbonnb at sympatico.ca Warning: dates on calendar are closer than they appear. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just £6.99 a month for your first 3 months, that's HALF PRICE! And then it's just £13.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com