Global Variable Question

J

Joe Williams

I am trying to set up a quick and dirty user login without having to go the
route of Access built in user security. This login would only be for gaining
access to the program, not anything deeper than that.

What is the proper way to declare a global variable for UserID? The user
would login with a form that would match thier username against the known
password, and if successfully logged in, the username would be assigned to
the Global Variable for that front End that I could reference when needed.

Where and how wold I declare this so that all forms, procedures, etc would
recognize the UserID global variable when needed?

Thanks

Joe
 
R

Rick Brandt

Joe Williams said:
I am trying to set up a quick and dirty user login without having to go the
route of Access built in user security. This login would only be for gaining
access to the program, not anything deeper than that.

What is the proper way to declare a global variable for UserID? The user would
login with a form that would match thier username against the known password,
and if successfully logged in, the username would be assigned to the Global
Variable for that front End that I could reference when needed.

Where and how wold I declare this so that all forms, procedures, etc would
recognize the UserID global variable when needed?

Just put...

Public UserID As String

....in any standard module.
 

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

Top