A
avarusbrightfyre
I have a form that has several text boxes for users to enter criteria for a
search. Each type of search has a separate button that opens a search form
based on criteria in the text boxes (yes, I used the wizard). This all works
fine, except for my date range search, because the wizard doesn't offer an
option to use the "between" function. I would imagine the button should work
fine if I use it and just go into the code builder and replace the criteria
portion of the code to filter out the records between the "me.FromDate" and
"me.ToDate" text boxes. The problem is that none of the standard operators
seem to work in the criteria portion of the code. Does anyone know what the
proper format is? Here is what I have so far:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Search Form"
DoCmd.OpenForm stDocName, , , Between #me.FromDate# and #me.ToDate#
Trying to use this format highlights the first # and gives me an "Expected
end of Statement" compile error.
What is the proper way to program this?
search. Each type of search has a separate button that opens a search form
based on criteria in the text boxes (yes, I used the wizard). This all works
fine, except for my date range search, because the wizard doesn't offer an
option to use the "between" function. I would imagine the button should work
fine if I use it and just go into the code builder and replace the criteria
portion of the code to filter out the records between the "me.FromDate" and
"me.ToDate" text boxes. The problem is that none of the standard operators
seem to work in the criteria portion of the code. Does anyone know what the
proper format is? Here is what I have so far:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Search Form"
DoCmd.OpenForm stDocName, , , Between #me.FromDate# and #me.ToDate#
Trying to use this format highlights the first # and gives me an "Expected
end of Statement" compile error.
What is the proper way to program this?