ChewDinCompSci
Technical User
I have a form that allows the user to choose the date and an equipment number to produce a report on. The trouble I'm having is that nothing happens when you click on the command button to preview the report. I want the data to be sent to a report an empty report I have already made. This is what I have for the command button.
Private Sub cmdmakereport_Click()
Dim strWhere As String
If IsNull([cboRptDate]) Or IsNull([cboRptEquip]) Then
MsgBox "You must enter both a date and equipment number."
DoCmd.GoToControl "cboRptDate"
End If
strWhere = "[Date] =#" & Me.cboRptDate & "# " & _
"AND [EquipmentNumber=""" & Me.cboRptEquip & """"
End Sub
My report is called rpt_qryByTruck. I'm almost certain I need a Docmd.OpenReport in here. Any ideas???
Private Sub cmdmakereport_Click()
Dim strWhere As String
If IsNull([cboRptDate]) Or IsNull([cboRptEquip]) Then
MsgBox "You must enter both a date and equipment number."
DoCmd.GoToControl "cboRptDate"
End If
strWhere = "[Date] =#" & Me.cboRptDate & "# " & _
"AND [EquipmentNumber=""" & Me.cboRptEquip & """"
End Sub
My report is called rpt_qryByTruck. I'm almost certain I need a Docmd.OpenReport in here. Any ideas???