Can anyone help me please, i am kinda stuck with Visual Basic but all i want to do is the following,
Have
VB check the entries in two fields on the form (username and password) then check these against what is stored in the table (users) and the form after it (member area) which has the data from the table users.
Once it has checked this data i want it to open the new form (login2) if the password AND user name corralate with each other in the form. what i have so far is,
On Error GoTo Err_Command20_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "login2"
stLinkCriteria = "[User Name]=" & "'" & Me![loginname] & "'"
Dim stlink2 As String
stlink2 = "[Password]=" & "'" & "'" & Me![pass1] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
this is loosely based on what the button wizard put in, but the problem with it is is that if any user name and password is correct it will let you through. If for example bob's user name is put in and freds password it will still grant access, whereas i want it so that it has to be Bob's username and password.
please help, i'd appreciate it.
dan