Forum Moderators: open
Set RS = DB.execute("SELECT * FROM tblmember WHERE DatePaid > =#"&BeginningDate&"# AND DatePaid <= #"&EndDate&"# ORDER BY LastName ASC")
I thought about setting BeginningDate to the day before the actual inputted date but didn't know how to do that.
Any help would be greatly appreciated.
Sorry 'bout my answer before, I didn't read your question right.
Does
NewDate = Format$((DateAdd("d", 1, Date(BeginningDate)), "mm/dd/yyyy")
...WHERE DatePaid > =#" & NewDate & "# AND...
I haven't tried this in ASP but it's the approach I would take in VB
you might need some parentheses in your sql statement too...
Set RS = DB.execute("SELECT * FROM tblmember WHERE (DatePaid > =#"&BeginningDate&"#) AND (DatePaid <= #"&EndDate&"#) ORDER BY LastName ASC")
it's always good to keep your order of operation obvious (both to you, and the compiler)
and honestly, the time doesn't matter when comparing dates. you just need to make sure both your strings are in valid date format, so the comparison will definitely be of the same datatype.
-Matt