Wortz, Charles
CWortz at tea.state.tx.us
Tue Mar 11 07:44:01 CST 2003
Paul, Variables declared in a form's module are only in scope while the form is open, even if they are declared public. Variables you want to last throughout the session must be declared in standard modules. That is one part of the O-O paradigm that Access follows. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Tuesday 2003 Mar 11 07:38 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