I have this unbound form which will create a report after the user selects the criteria. The criteria is taken from two different queries which are from two different tables. the report is not coming up with the correct information.
Am I not calling the query or not defining the criteria enough?
After defining the criterion I click OK or Cancel and OK should come up with a report. I know I am missing something dumb here.
Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click
Dim stDocName As String
stDocName = "rptMajor"
DoCmd.OpenReport stDocName, acPreview
Exit_cmdOK_Click:
Exit Sub
Err_cmdOK_Click:
MsgBox Err.Description
Resume Exit_cmdOK_Click
End Sub
Nina
Am I not calling the query or not defining the criteria enough?
After defining the criterion I click OK or Cancel and OK should come up with a report. I know I am missing something dumb here.
Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click
Dim stDocName As String
stDocName = "rptMajor"
DoCmd.OpenReport stDocName, acPreview
Exit_cmdOK_Click:
Exit Sub
Err_cmdOK_Click:
MsgBox Err.Description
Resume Exit_cmdOK_Click
End Sub
Nina