Hi there!
First of all, I'm a beginner. If you're attempting to answer, please assume I have no knowledge of databases, access or VBA coding.
Key Facts:
-> Access 2013 professional plus.
-> Very Limited Knowledge of Access.
Okay. Question 1:
I have a table (tbl_Users) of users with fields containing there username (UserLogin) and their passwords (Password). I have set up so that the passwords show up as asterisks's and that they are all password. What I want, is a login form that will reference the tables usernames and passwords and depending on the result, will let them log in.
At the minute, I have worked out how to fill out a basic login form that using VBA code, either allows the user to log in, or presents them with a message. Here's a copy of the code (That works):
However, I don't want to list all of the 500+ employee's passwords and usernames within the coding, for obvious tiring reasons but also for security. Instead, I have completed a table, and want the login button to see if A. The username is in the table, and then B. if the password entered is the one matching in the table. I have looked at examples and other videos and all sorts, but it's confusing. I need someone to break it down for me. Can anyone help me with this?
Question 2:
In order for different users with different security levels to be directed to different switchboards, how would I do this? Would it be easiest to have a different table for each different security level. So that I can just make the database search for the username in table A, if found, go's to security level's A appropriate switchboard, if not, go to B, and do the same, or if not, go to C. And then check password against username in whatever table. So I'd create 3 different switchboards, is this the best option?
Question 3:
Is there a way to create automatic entries into specific fields? For example, I have managed to create a new user form for Admins, and this involves them typing the first name and last name into textboxes, Is it possible for the system to somehow take the first letter of the first name and then the whole last name of the new user and put it into a username field? As well as the names, it would have 01 next to it, however if the same name arises, then it would be 02?
For example:
Joe Bloggs, added 16/07/2016, would have the username JBloggs01.
JimBloggs, addeed 17/07/2016, would have the username JBloggs02.
Is there a way for access to automatically do this?
Question 4:
All passwords will be set as password, however I want a way for once the user to be able to change their password, for obvious security reasons. Is this possible?
Question 5:
If I want a button to move the user from a form (Form A) to another form (Form B) would I do the below:
(On the coding option on the button in form A)
DoCmd.Close
DoCmd.OpenForm "Form B"
Question 6:
Is there a way to make a button move the user from the current form to the last form they were at? I.e.
They have moved from form A to form B, but want a form of a back arrow that can lead to the last place (form, database, whatever) they accessed?
Question 7:
Is there a way to insert a gif onto a form?
Thanks for any help! It's really needed..
Declan
--
To anyone who helped on my first post, thank you, but it didn't work. Since I had other questions, I figured I'd post another thread witht hem all on it.
First of all, I'm a beginner. If you're attempting to answer, please assume I have no knowledge of databases, access or VBA coding.
Key Facts:
-> Access 2013 professional plus.
-> Very Limited Knowledge of Access.
Okay. Question 1:
I have a table (tbl_Users) of users with fields containing there username (UserLogin) and their passwords (Password). I have set up so that the passwords show up as asterisks's and that they are all password. What I want, is a login form that will reference the tables usernames and passwords and depending on the result, will let them log in.
At the minute, I have worked out how to fill out a basic login form that using VBA code, either allows the user to log in, or presents them with a message. Here's a copy of the code (That works):
Code:
Private Sub Command1_Click()
Username.SetFocus
If Username = "user1" And Password = "user1" Then
MsgBox "Successful Login", vbInformation, "Central Bedfordshire Libraries Training and Induction"
DoCmd.Close
DoCmd.OpenForm "Frm_Main"
Else
MsgBox "Invalid Username/Password combination, please try again."
Me.Username.SetFocus
End If
End Sub
Question 2:
In order for different users with different security levels to be directed to different switchboards, how would I do this? Would it be easiest to have a different table for each different security level. So that I can just make the database search for the username in table A, if found, go's to security level's A appropriate switchboard, if not, go to B, and do the same, or if not, go to C. And then check password against username in whatever table. So I'd create 3 different switchboards, is this the best option?
Question 3:
Is there a way to create automatic entries into specific fields? For example, I have managed to create a new user form for Admins, and this involves them typing the first name and last name into textboxes, Is it possible for the system to somehow take the first letter of the first name and then the whole last name of the new user and put it into a username field? As well as the names, it would have 01 next to it, however if the same name arises, then it would be 02?
For example:
Joe Bloggs, added 16/07/2016, would have the username JBloggs01.
JimBloggs, addeed 17/07/2016, would have the username JBloggs02.
Is there a way for access to automatically do this?
Question 4:
All passwords will be set as password, however I want a way for once the user to be able to change their password, for obvious security reasons. Is this possible?
Question 5:
If I want a button to move the user from a form (Form A) to another form (Form B) would I do the below:
(On the coding option on the button in form A)
DoCmd.Close
DoCmd.OpenForm "Form B"
Question 6:
Is there a way to make a button move the user from the current form to the last form they were at? I.e.
They have moved from form A to form B, but want a form of a back arrow that can lead to the last place (form, database, whatever) they accessed?
Question 7:
Is there a way to insert a gif onto a form?
Thanks for any help! It's really needed..
Declan
--
To anyone who helped on my first post, thank you, but it didn't work. Since I had other questions, I figured I'd post another thread witht hem all on it.