Setting Security Without Using MS Workgroup Functionality

mous

Registered User.
Local time
Today, 06:33
Joined
Sep 26, 2001
Messages
109
Hello There

Does anyone know of a way or point me in the right direction to how I can set up my own security within Access 97.

I have 1 user and 1 password to acess mulitple workgroups.

I have already created a login form so when the user types in their user name a list of available workgroups shows to them (this is done by a standard query). Now regardles of the workgroup chosen how do I "map" the entered password against that held in the tbluser table.

Any help would be great!
 
You suppose to have 2 text controls on the sign-up form. The first one for user name and the other for password. I assume their names are txtUser and txtPassword.

Then create a command button and put the code below to it on On_Click event.

Private Sub Command1_Click()
If Not IsNull(DLookup("UserNameField", "UserNamesTable",[UserNameField]='" & Me.txtUser & "' And [PasswordFieldName]='" & Me.txtPassword & "'")) Then
... ' User Name and Password exist.
Else
MsgBox "User Name or Password is not correct" & vbCrLf & "Try again", vbOKOnly,"Oops!"
Me.txtUser = Null
Me.txtPassword = Null
Exit Sub
End If
End Sub
 
I've added my fields and tables in but there seems to be a problem with the DLookup function. It is in red. Sorry I don't know much about programming.

Regards

Dawn
 
Sorry my fault. I left one " out. Put it back and try again.

...
If Not IsNull(DLookup("UserNameField", "UserNamesTable","[UserNameField]='" & Me.txtUser & "' And [PasswordFieldName]='" & Me.txtPassword & "'")) Then
...
 
Thanks for all your help. It now works.

Regards

Dawn
 

Users who are viewing this thread

Back
Top Bottom