Help,
Hi there, I'm having difficulty figuring this one out.
Here's what I'm trying to do, I have the opening form (frmLogon). Now the user will enter in their username into (txtUsername) and their password into (txtPassword).
Then the user clicks on (cmdLogon). When clicked, my code verifies that the username and password match up with a table (tblLogon). Another field on the table is UserType. There are 3 types of users (FullControl, FormsReports, ReportsOnly). Each Username and Password are assigned one of the 3 usertypes.
Once the Username and Password is confirmed to match the table, I have the code tell me what the UserType is. I then assign the result to (stUserType), which I declared
Public stUserType as String
The code then opens the second form (frmSurveillance). Then based on what the stUserType is from frmLogon different command buttons will appear on frmSurveillance.
Where the problem lies is once I move on to the second form (frmSurveillance) or the third form (frmBird) the database doesn't know what the stUserType is.
What do I do in order to store the UserType in the (cmdLogon) and how do I use it on the other forms such as (frmSurveillance or frmBird)?
Any help would be greatly appreciated, thanks
Dave
Hi there, I'm having difficulty figuring this one out.
Here's what I'm trying to do, I have the opening form (frmLogon). Now the user will enter in their username into (txtUsername) and their password into (txtPassword).
Then the user clicks on (cmdLogon). When clicked, my code verifies that the username and password match up with a table (tblLogon). Another field on the table is UserType. There are 3 types of users (FullControl, FormsReports, ReportsOnly). Each Username and Password are assigned one of the 3 usertypes.
Once the Username and Password is confirmed to match the table, I have the code tell me what the UserType is. I then assign the result to (stUserType), which I declared
Public stUserType as String
The code then opens the second form (frmSurveillance). Then based on what the stUserType is from frmLogon different command buttons will appear on frmSurveillance.
Where the problem lies is once I move on to the second form (frmSurveillance) or the third form (frmBird) the database doesn't know what the stUserType is.
What do I do in order to store the UserType in the (cmdLogon) and how do I use it on the other forms such as (frmSurveillance or frmBird)?
Any help would be greatly appreciated, thanks
Dave