Hello,
I have created a form for search for users information and display the information in a report. I have used to following code to search for specific users:
Private Sub Find_Pupil_Click()
Dim sSurname As String
Dim sRegClass As String
sSurname = Me.txtSurname
sRegClass = Me.txtRegClass
If DCount("*", "T_Pupil_Information", "Surname = '" & sSurname & "' And RegistrationClass = '" & sRegClass & "'") = 0 Then
MsgBox "Incorrect User Details! Please re-enter your details", vbExclamation, ""
Else
DoCmd.OpenReport "R_Pupil_Evidence", acViewNormal
End If
End Sub
When a users enters a Surname and Registration Class into the unbounded text boxes (Surname and RegistrationClass) and a user is found, I want their details to be presented in the Report (R_Pupil_Evidence) I have created. However, when searching for a user at present, the report is automatically going to print and not to Report View.
Can anyone help me with this????
Regards
Macftm