I have created an overdue payment letter and linked the report to a form. How do I display the report only if the Date Paid field from the current record on the form is blank/null? I need to add a condition to this line?
stWhere = "[Job Id]=" & Me![Job Id]
Here is the on click code :
stWhere = "[Job Id]=" & Me![Job Id]
Here is the on click code :
Code:
Private Sub cmdOverduePayment_Click()
On Error GoTo Err_cmdOverduePayment_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "rptLetter"
stWhere = "[Job Id]=" & Me![Job Id]
DoCmd.OpenReport stDocName, acPreview, , stWhere
Exit_cmdOverduePayment_Click:
Exit Sub
Err_cmdOverduePayment_Click:
MsgBox Err.Description
Resume Exit_cmdOverduePayment_Click
End Sub