Storing Values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i designed a database with login form and if the user is successfully logged
the login information is always stored to my table tblloginfo, can this
information can be store in class or class module or in any code? and how
can i do this?
 
Resti

Tables store data in Access. How would you propose to have code store it?

Jeff Boyce
<Access MVP>
 
You can assign the value to a global variable, so it is available for the
duration of the application, but when the mdb is closed the value will be
lost.
 
If you meant storing permanently (between Access session) then you can only
store in Tables usually (sometimes INI file and Registry are used).

If you meant holding the user's details in memory for ease of access /
retrieval during the current session of Access then you can write a Class,
instantiate an Object of this Class and assigning values for the Properties
for quick retrieval later in the currect session of Access.

Check Access VB Help on Class Modules.
 
I have accomplished this exact issue in 2 different situations:

1) Using A00 and a replicated database, I stored all the user login
information in a table called tbl_user. When the database first opens, a
form comes up prompting for login information. A module processes the login
information against the table (for authentication) and stores the user's
login name, group, and another data point in a public module as a public
variable.

2) Using a shared A97 database, I did the same as above, but stored the user
information in a form that is hidden.
 
Back
Top