The way that I have the dates set up is so that they are numbers and not text fields is there any thing that needs to be changed about the above syntax, because I am getting an error that states:
Run time error '2465'
Microsoft Access can't find the field '|' referred to in your expression.
and this is what the vb editor is highlighting.
strSQL = "Select * From Cit WHERE Cit.KEY-DATE Between #'" & Me!txtFrmDate & "'# AND #'" & Me!txtToDate & "#'" And [CIT-Loc] Like " & Me!txtCit_Loc & "
strSQL = "Select * From Cit WHERE Cit.KEY-DATE Between #'" & Me!txtFrmDate & "'# AND #'" & Me!txtToDate & "#'" And [CIT-Loc] Like " & Me!txtCit_Loc & "
Should be:
strSQL = "Select * From Cit WHERE Cit.KEY-DATE Between #" & Me!txtFrmDate & "# AND #" & Me!txtToDate & "# And [CIT-Loc] Like '*" & Me!txtCit_Loc & "*' "
Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
Ok, great I got the query working, I was wondering if you could help me with something else.
I am tring to get the count of how many records the query returns. Now I created a query that will return the count of the records, but I can not get them to display on the screen in one of my controls.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.