Hello,
I am trying to filter a report based on two user inputed dates, but can't seem to figure it out. I've played around with quotation marks, and # but can't seem to figure the syntax out. Anyone know what I'm missing here?
I am trying to filter a report based on two user inputed dates, but can't seem to figure it out. I've played around with quotation marks, and # but can't seem to figure the syntax out. Anyone know what I'm missing here?
Code:
Me.OrderBy = "Date Submitted"
Me.OrderByOn = True
Dim Date1 As Date
Dim Date2 As Date
Date1 = UserInput
Date2 = UserInput
DoCmd.ApplyFilter WhereCondition:="[Date Submitted] > Date1 and < Date2"