Public Variables not holding value


Mark A. Sam

Am I wrong in thinking that Variables declared as Public in a Public module
should maintain their value?

I have been having a problem for a long time with this issue. On a password
system that I created, the password is stored in a public variable. Forms
will as the user to log in if the variable is null. This happens
occasionally while I am developing and taking forms into design view.

I am working on a procedure now which utilized a public variable to filter a
query via a function. The query is used as a source recordset to populate a
table record. All of the fields aren't being populated and I need to check
the query results. I can't do this while the module is running (at a break
point) becuase when I try to open the query I get an Unknown Jet error.
When I stop code execution, the value of the public variable is 0. While
the code is in execution it has the correct value.

Are there some rules about public variable that I need to know of is this
another bug?

This is A2k running on Windows 2000.


Mark A. Sam

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question