I have a report that, when run, I would like to see the applicable records for the last 30 days.
In the Form_Open event, I have the following code:
It's not working. I get a dialog box asking for a value for varDate.
How do I get this to work?
Thanks in advance,
Onwards,
Q-
In the Form_Open event, I have the following code:
Code:
Private Sub Report_Open(Cancel As Integer)
Dim varDate As Variant
varDate = Now() - 30
Me.FilterOn = True
Me.Filter = "Date >= varDate"
End Sub
It's not working. I get a dialog box asking for a value for varDate.
How do I get this to work?
Thanks in advance,
Onwards,
Q-