Resolved: Quick question regarding Access 2000 forms
Hello all,
Here we go. FormA user enters login info once the login is entered and the ok button pressed the form loads the data to memory and then closes itself. Is the data that was loaded lost when the form closes? Also, FormB runs a script that uses the login info that FormA loaded to memory. Would I have needed to load that login info as public? Or is a Dim statement sufficient.
In summation, if a form is closed but the database remains open do I lose the data that the code within that form loaded to memory and therefore it would be better just change the form to visible = false when the info is loaded to memory? And When I need to share info between two or more forms does it need to be loaded as public or is the Dim statement sufficient? Thanks! I apologize if my terminology is incorrect.
Hizaed
Re: Quick question regarding Access 2000 forms
if you declare a variable on form1 and load something into that variable, then close the form, you will lose the data.
If you want to use variables from form to form, I suggest declaring a Public variable in a module
Re: Quick question regarding Access 2000 forms
Of course! That makes sense, thank you once again Smitty.
Re: Resolved: Quick question regarding Access 2000 forms
Or write the login info to a table so you can access it as needed. If security's an issue, delete the data as soon as you don't need it. In .Net you can pass variables to forms when you open them, but then other issues get involved because you dim the form you're going to open.