Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub cmdRptCustLabels_Click()
On Error GoTo Err_cmdRptCustLabels_Click
Dim stDocName As String
[blue] Dim strWhere As String 'added[/blue]
stDocName = "YourReportName"
[blue] If Not IsNull(Me.cboTown) Then
strWhere = "[Town]='" & Me.cboTown & "'"
End If[/blue]
DoCmd.OpenReport stDocName, acPreview[blue], , strWhere[/blue]
Exit_cmdRptCustLabels_Click:
Exit Sub
Err_cmdRptCustLabels_Click:
MsgBox Err.Number & vbCrLf & Err.Description
Resume Exit_cmdRptCustLabels_Click
End Sub