Hello Charlottew14
You may have now figured these out already, but just to answer your specific questions:
"on the Login code, where does it say that if the UserAccess is this, then open this form, if it is that, open that form?"
The frmUserLogin form is used purely to identify who the user is and to verify that they are who they say they are by requesting a password. The information that they supply is then compared against inforamation that is already stored in tblUsers
"And also, what exactly needs to be on the switchboard form"
This can be considered as the first main page of the database and will contain buttons to navigate to the other forms that you have created. But now, when a user clicks on a button on the switchboard form (or any other form if you wish) you will be able to perform a check to see if their user level will permit them to open that form. Or you can decide which particular form they navigate to based on their user level.
Just to explain the code a bit more, I've created a recordset and populated it with the UserName and UserAccess, but only if the UserName and Password match to a record in the tblUsers table (myRS.Open "SELECT UserName, UserAccess FROM tblUsers WHERE UserName = " & UserName & " AND Password = " & UserName & "")
I've then checked to see if the recordset contains any records, which it will only do if the UserName and Password supplied by the user matched with a record in tblUser (If myRS.RecordCount > 0 Then)
pr2-eugin has used DLookUp to perform a similar check, which I agree makes it less complicated. However, there is a small typo in pr2-eugin's code - in the DLookUp line, it should read:
UserAccess = Nz(DLookUp("UserAccess","tblUsers","UserName = " & UserName & " AND Password = " & Password & ""),"N/A"
(Let's ignore the fact that the typo originated from my code and move on
)
The DLookUp function has been wrapped in an Nz function to deal with Nulls.
The Doc Man makes a good point about disabling the navigation panel. I've recently become aware of MS Access 2010 Runtime. This is free to download and will allow you to distribute the database to users who don't have Access 2010. Most importantly it has none of the features of Access and so users can't bypass any of the controls you've put in place, or see the underlying tables. Only downside is that any unresolved errors in your code will cause the database to crash rather than just giving an error message. You can see what the runtime version will look like by changing the file extention from .accdb to .accdr (though this is just for testing and will not stop the user from changing it back to .accdb!)
Hope that helps
Speedball