Chip said:
I have a ACCESS database that i need to have an Opening Login Form that the
person selects themself from a combo then puts in a password that both are
stored in a UserTable that has their name, a user number and a password in
it. THEN after they put in their password correctly they hit a button that
sends them to another form that is filtered by the by the User Number of the
person has logged in.
I am really really new to ACCESS and just learning VB so this may be a
simple task but cannot figure out where to start or how to make it function
correctly!!! Any assistance would be greatly appreciated!!! THANKS IN
ADVANCE!!!!
Something along the lines of...
Dim UserNumVar as Variant
UserNumVar = DLookup("[User Number]", "UserTable", "[UserName] = '" &
Me!NameComboBox & "' AND [Password] = '" & Me!Password & "'")
If IsNull(UserNumVar) = False Then
DoCmd.OpenForm "FormName",,,"[User Number] = " & UserNumVar
End If
However; home-grown security like this is worthless if any of your users are
familiar with Access. Do you have any users who know how to...
....hold down the shift key while opening the file to gain access to the db
window (including all tables)?
Press F11 after opening the file to gain access to the db window (including all
tables)?
Open any other file and then either link or import the tables in your file
thereby gaining access to all tables including the one with Users and Passwords?
You can throw some barriers up to make the above a bit harder to do, but the
only one that has any teeth at all is to implement Access built-in security and
of course that would render your home-grown solution unnecessary.