hockeylvr
Technical User
- Nov 26, 2002
- 140
Would appreciate some keywords or a point to a thread that could help me with this. I know the answer must be here somewhere but I've exhausted all ideas. I have a query with calculations in a column [Savings]. I have a form with two text boxes for dates, "txtStartDate" and "txtEndDate". I just want to click on a command button and have the query open to show only those records between the two dates. I've seen that I cannot use RunSQL and OpenQuery does not allow WHERE statements. I've tried the below with no results.
Dim strSavings As String, Criteria As String
Criteria = "[monthdate] Between #" & Me.txtDate & "# AND #" & Me.txtEndDate & "# "
strSavings = DLookup("[monthdate]", "[qryEngSavings]", Criteria)
Thanks!
Dim strSavings As String, Criteria As String
Criteria = "[monthdate] Between #" & Me.txtDate & "# AND #" & Me.txtEndDate & "# "
strSavings = DLookup("[monthdate]", "[qryEngSavings]", Criteria)
Thanks!