Hello,
How can I get the propertyid to equal 1 & 2 & 3 if the propertyid selected from the form = 12? I have the code below placed in the form which is transfered over to the report.
On Error GoTo Err_Preview_Click
Dim strWhereProperty As String
strWhereProperty = "PropertyID = Forms![frmPropertySelection]!SelectProperty"
Select Case Me!ReportToPrint
Case 1
DoCmd.OpenReport "rptTicket", PrintMode
Case 2
'DoCmd.OpenReport "rptTicket", PrintMode, , strWhereProperty
Case 3
If IsNull(Forms![frmPropertySelection]!SelectProperty) Then
DoCmd.OpenReport "rptTicket", PrintMode
Else
DoCmd.OpenReport "rptTicket", PrintMode, , strWhereProperty
End If
End Select
DoCmd.Close acForm, "frmPropertySelection"
Exit_Preview_Click:
Exit Sub
Err_Preview_Click:
Resume Exit_Preview_Click
How can I get the propertyid to equal 1 & 2 & 3 if the propertyid selected from the form = 12? I have the code below placed in the form which is transfered over to the report.
On Error GoTo Err_Preview_Click
Dim strWhereProperty As String
strWhereProperty = "PropertyID = Forms![frmPropertySelection]!SelectProperty"
Select Case Me!ReportToPrint
Case 1
DoCmd.OpenReport "rptTicket", PrintMode
Case 2
'DoCmd.OpenReport "rptTicket", PrintMode, , strWhereProperty
Case 3
If IsNull(Forms![frmPropertySelection]!SelectProperty) Then
DoCmd.OpenReport "rptTicket", PrintMode
Else
DoCmd.OpenReport "rptTicket", PrintMode, , strWhereProperty
End If
End Select
DoCmd.Close acForm, "frmPropertySelection"
Exit_Preview_Click:
Exit Sub
Err_Preview_Click:
Resume Exit_Preview_Click