Still need help with Search Form

CGC

Registered User.
Local time
Today, 13:27
Joined
Nov 12, 2001
Messages
12
I already posted this but didn't get responses, so I thought I'd try again just in case...
I have a form set up just for searching. It's an unbound form set up with numerous combo boxes (also unbound) so the user can search on as many fields as they want. The problem field is the date field. I want the search form to allow the user to search by date - including a range of dates. I have a combo box set up that will allow the user to enter 1 date and it will search for that, but I have 2 problems with this: (1)once I added this date combo box, it automatically changed my form to only search on records with dates - it no longer see the records that do not have dates(not all records will include this date information).(2)I don't know how to change this to allow a range of dates (say they want all records with date 1/1/2002-2/28/2002). I have looked thru numerous samples databases and knowledge base searches, but haven't found any help there. If anyone can point me in the right direction, I would really appreciate it! Thank you!
 
I'll give it a try! Thanks for the suggestion - hopefully it will give me a solution!
 
Ok, I'm still stuck. I looked at the QrySmp00 and that won't work. Following this method, it only picks up the records that have a Date and not all of them do. The people using this search form want to be able to search by date, or not, depending on the info they are looking for. Also, they want to search using drop down boxes, not text boxes (they may have temps using this database and they wouldn't know a customer id, etc). I really need help - anyone have any other ideas? Thanks again.
 
Post your SQL Code. Have you made sure you have added 'Like DateField Or is Null' into your criteria box. You can use the between command in your criteria to search between 2 dates. eg. Use 2 text boxes txtStartDate and txtEndDate. Get the user to type in the dates or use 2 combos. In the criteria of your date field use Between Forms!Yourform![txtStartDate] And Forms!Yourform![txtEndDate] Or Is Null.
HTH
 

Users who are viewing this thread

Back
Top Bottom