I have the following code:
Private Sub Form_Current()
Dim ANS As Integer
ANS = MsgBox("Click on the button to generate a monthly report of followup items to be completed", vbOKOnly)
If ANS = 1 Then DoCmd.OpenReport "rptFollowups", acViewPreview, , "[IActToBeDt] = Date()"
End Sub
First of all, it is filtering on the current date for IActToBeDt, but the report comes up briefly only to be covered up by a form that is being opened at the same time (I want the form to come up and then the report to open up on top of that until the report is closed) and secondly, I am trying to make the filtering criteria an OR statement (i.e., if one date field is the current date OR another date field is the current date, list the appropriate records). Am I approaching this the wrong way? This report is based on a query, so I did try putting Date() in the criteria...or section of the query, which I thought would be the easier way and this did not work.
[This message has been edited by Romulus (edited 02-19-2002).]
Private Sub Form_Current()
Dim ANS As Integer
ANS = MsgBox("Click on the button to generate a monthly report of followup items to be completed", vbOKOnly)
If ANS = 1 Then DoCmd.OpenReport "rptFollowups", acViewPreview, , "[IActToBeDt] = Date()"
End Sub
First of all, it is filtering on the current date for IActToBeDt, but the report comes up briefly only to be covered up by a form that is being opened at the same time (I want the form to come up and then the report to open up on top of that until the report is closed) and secondly, I am trying to make the filtering criteria an OR statement (i.e., if one date field is the current date OR another date field is the current date, list the appropriate records). Am I approaching this the wrong way? This report is based on a query, so I did try putting Date() in the criteria...or section of the query, which I thought would be the easier way and this did not work.
[This message has been edited by Romulus (edited 02-19-2002).]