Triple post, watch out now! Please disregard my last post I found the problem. I forgot to rename source field when I copied code for destination. DOH!
Thanks again for the help.
Just encountered a new problem, whenever the search criteria includes both zone fields the form won't return any results. If I search by only one zone everything works fine (I can use origin city,state,zone with destination city,state and all works fine). But as soon as I include both zone...
Many thanks to PHV and kkitt the code seems to work perfectly!! I spent 6+ hours on this yesterday (because I thought PHV's method didn't work. Goes to show I should take my time more often.
Thanks again!
Thanks for your response. Sorry I didn't responds sooner, but I forgot how to get here so had to wait until I returned to work. I've made changes as was suggested however it still doesn't work correctly. Here is a snippet of what I'm using now:
If Not IsNull(Me.txtSrchSZone) Then
If sql...
With help from members of this forum I have a working search form that checks search criteria against the fields they are associated with. My next step to tackle is to include "keywords" that search for their own set of criteria. For example, I would like the user to be able to search for "Z1"...
Thanks for the quick responses! I made the changes suggested, however I'm still getting all results with anything in the searched fields... Here is my updated code:
Sub DoDispatchSearch()
Dim ok As Boolean, sql As String
ok = False
sql = " WHERE "
If Not IsNull(Me.txtSrchSCity) Then
If...
I'm trying to set up a search form with 4 txtboxes for search criteria, each text value passed needs to be compaired 5 fields of my database. If I use only one field for the search everything works OK, but as soon as I add 'OR' to search multiple fields it will return ANY records with ANYTHING...
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.