Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to store information on one form to use on another form

Status
Not open for further replies.

dsmart16

IS-IT--Management
Joined
Nov 30, 2004
Messages
12
Location
CA
Help,

Hi there - I am using a log on form as my opening form for the database.

I have a table that has a list of usernames, passwords, and usertype.

There are 3 different usertypes (FullControl, FormsReports, & ReportsOnly)

I am using the usertype to determine what command buttons the user sees.

I have it working from going from form1 to form2.

Where my difficulty is - when I go from form2 to form3 and then back to form2 the database has forgotten what the usertype is.

So what I am thinking is that I need to declair this to be used throughout the entire database, but I don't know how.

Any help is greatly appreciated, thanks
Dave
 
If you are trying to setup security, you would be better off (safer) and have more flexibility if you used Access's security. You can create groups, assign rights to the groups, and then assign individuals to the groups.

But, with that said, to do what you want, create a new module and declare you variables as public. After the user enters their name and password, save it in the public variable. This is how you declare it.

Public gstrUserName as String

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top