I would like to replace the Dlookup that appears in the On Click Events procedure.
The purpose was to lookup the report name for a given place.
Instead, I have figured out how to get the desired report name to appear automatically
in the same form in a Text Box using ..... =[cboReportNumber].[Column](1)
For example, the report name might be .... rptTicketIndCharter
So the new sReportNameSpl would use this rpt name. Thanks, Glen
Here is what I have presently.
Private Sub cmd1171_Click()
On Error GoTo Err_cmd1171_Click
Me.Refresh
Dim sReportNameSpl As String
sReportNameSpl = DLookup("Reportname", "tblreport", "[BusnID] = " & Me.BusnID _
& " And [resort#] = " & Me.ResortID & " And [ReportNum] = " & Me.cboReportNumber)
DoCmd.OpenReport sReportNameSpl, acViewPreview
DoCmd.Maximize
Exit_cmd1171_Click:
Exit Sub
Err_cmd1171_Click:
MsgBox Err.Description
Resume Exit_cmd1171_Click
End Sub
The purpose was to lookup the report name for a given place.
Instead, I have figured out how to get the desired report name to appear automatically
in the same form in a Text Box using ..... =[cboReportNumber].[Column](1)
For example, the report name might be .... rptTicketIndCharter
So the new sReportNameSpl would use this rpt name. Thanks, Glen
Here is what I have presently.
Private Sub cmd1171_Click()
On Error GoTo Err_cmd1171_Click
Me.Refresh
Dim sReportNameSpl As String
sReportNameSpl = DLookup("Reportname", "tblreport", "[BusnID] = " & Me.BusnID _
& " And [resort#] = " & Me.ResortID & " And [ReportNum] = " & Me.cboReportNumber)
DoCmd.OpenReport sReportNameSpl, acViewPreview
DoCmd.Maximize
Exit_cmd1171_Click:
Exit Sub
Err_cmd1171_Click:
MsgBox Err.Description
Resume Exit_cmd1171_Click
End Sub