Originally Posted by
macftm
I am trying to create a form which will allow users to enter responses (using combo boxes for responses) to a series of questions which is to be stored in a table.
In order to access this form (which is a navigation form), the users must enter their unique details into a search form first which will then run a query to check if the user is allowed access.
However, I am finding it difficult to create the code for the search button so that when the user enters the details correctly, the navigation form appears for that person only appears. At the moment, whatever user name I enter, first user listed in the user details table appears.
I have the following code attached to the search button located on the search button:
Private Sub Command12_Click()
If Nz(DCount("*", "Q_PSE_Pupil_Search_T1"), 0) = 0 Then
MsgBox "Incorrect User Details! Please re-enter your details", vbExclamation, ""
Else
DoCmd.OpenForm "Navigation Form1"
End If
End Sub