I have two unbound text boxes in a form called startdate and enddate. On form open, the two fields are populated with dates with the code below.
Private Sub Form_Open(Cancel As Integer)
Me.StartDAte.SetFocus
Me.StartDAte.Text = Format$(Now - 7, "MM/DD/YYYY")
Me.EndDate.SetFocus
Me.EndDate.Text = Format$(Now, "MM/DD/YYYY")
End Sub
The query for the report has a date field with the critieria
Between [Forms]![Main Menu]![StArtDate] And [Forms]![Main Menu]![EndDate]
If the fields contain 7/26/10 and 8/2/10 and I press a preview report button, the report will not include data for the latest date 8/2/10.
I would have to change the date to 8/3/10. I would like to have it so that the user actually gets data for that date range shown for the startdate and enddate fields. Any help would be appreciated. Thank you.
Private Sub Form_Open(Cancel As Integer)
Me.StartDAte.SetFocus
Me.StartDAte.Text = Format$(Now - 7, "MM/DD/YYYY")
Me.EndDate.SetFocus
Me.EndDate.Text = Format$(Now, "MM/DD/YYYY")
End Sub
The query for the report has a date field with the critieria
Between [Forms]![Main Menu]![StArtDate] And [Forms]![Main Menu]![EndDate]
If the fields contain 7/26/10 and 8/2/10 and I press a preview report button, the report will not include data for the latest date 8/2/10.
