Good Morning,
Is there a way to pass the “Between Date And Date” criteria to a query in vba? I know there are a couple of ways of passing the date range to the query but don’t know how to pass it through code.
In the query grid, in the criteria section of a date, I want it to read, for example: “Between 1/1/01 and 12/31/01” ,with the BeginingDate and EndingDate being what is passed in code. Something like this:
dim dStart as Date
dim dEnd as Date
dStart = DLookup(“NewStartDate”, “qryNewDates”)
dEnd= DLookup(“NewEndDate”, “qryNewDates”)
but I don’t know, if, a) this is the correct approach, if it is, how to complete it and how to pass it to the query.
If anyone has any suggestions, I would love to hear it.
Thanks in advance.