J
Jason
Newb question:
I've got a report that I want to filter by date based on
user input. Here is the code that I wrote, which I am
sure is missing something, as it doesn't work:
Private Sub Report_Open(Cancel As Integer)
Dim dteStartDate As Date
Dim dteEndDate As Date
dteStartDate = InputBox("Enter start date of report as
mm/dd/yyyy", "Start Date")
dteEndDate = InputBox("Enter end date as
mm/dd/yyyy", "End Date")
DoCmd.ApplyFilter , dteStartDate < txtInjuryDate <
dteEndDate
End Sub
This generates the prompts to ask for the dates, but then
gives the error "You entered an expression that has no
value"
Any help would be much appreciated.
I've got a report that I want to filter by date based on
user input. Here is the code that I wrote, which I am
sure is missing something, as it doesn't work:
Private Sub Report_Open(Cancel As Integer)
Dim dteStartDate As Date
Dim dteEndDate As Date
dteStartDate = InputBox("Enter start date of report as
mm/dd/yyyy", "Start Date")
dteEndDate = InputBox("Enter end date as
mm/dd/yyyy", "End Date")
DoCmd.ApplyFilter , dteStartDate < txtInjuryDate <
dteEndDate
End Sub
This generates the prompts to ask for the dates, but then
gives the error "You entered an expression that has no
value"
Any help would be much appreciated.