Query Search

pekuiper

Registered User.
Local time
Today, 03:50
Joined
Sep 28, 2007
Messages
28
I have a Query with a field “D1” from my “Data entry Form” and want to do a date search [Enter Date] in the Criteria; easy. But I also have 4 other fields “D2”, “D3”, “D4” and “D5 in the same form. How can I do a query search to find a certain date looking in all the fields? :confused:
 
Seems you have normalization problem. You have 5(!) date fields in a single table? Ok is is possible. But you should be certain that it's okay.

Code:
select * from table where D1 = [Enter date] or D2 = [Enter date] or D3 = [Enter date] or D4 = [Enter date] or D5 = [Enter date]
If you have at least one match in a record, it will be selected. It is possible that you need to add #. Like this: #[Enter date]#

Enjoy!
 
Thank you for your reply…I don’t want to sound drummer than I am but where do I put the:

select * from table where D1 = [Enter date] or D2 = [Enter date] or D3 = [Enter date] or D4 = [Enter date] or D5 = [Enter date]
 
What is being shown is the SQL for a query, if you allready have a query and are working in the query design grid put [Enter Date] in the criteria of the date field, all on different rows to create the or conditions.

Brian
 
Got it...Thanks a million...did all but that...it works great.
 

Users who are viewing this thread

Back
Top Bottom