searching for 2 items in one query?

nawara

Registered User.
Local time
Yesterday, 16:39
Joined
Jul 23, 2008
Messages
29
hello there
i have created a query based on the DATE Feild.. this enables me too find a specific record.
however i was wondering if this was possible...
when i type a date in the search key ... is it possible to type in two dates soo that the record can come up for both dates?
eg. 31/07/08,01/08/08

i want to do this as sometimes i print out queiry tables based on the feilds i want to have up on there
Regards Noor
 
do you want to use only two dates or it could be more than two
 
it could be more than two dates
is there a difference wether its two or more?
thank you
Regards Noor
 
It cannot be done directly in query you have to write VBA to do this
 
hmmmmm... ok i see... and how can i do that?
Regards Noor
 
Hi,

Although i am not sure if it is the best method, i managed to go about a similar solution by using the BuildCriteria function ... see this thread for more.

Also there are other suggestion by valuable members in that thread which may apply to your situation.

Goodluck
 
Created a quick sample for you

there is some data in table1 check data first

then open the report rpt1 input box will open

I have enter data for three dates 15-jun-08, 18-jun-08, 21-jun-08
enter any one two or more dates seperated by commas report will be shown for those dates

For example enter 15/06/2008,21/06/2008

you can enter dates in any format i-e medium date short date etc

ask me if there is any further query
 

Attachments

Last edited:
thank you very much for your response.. it looks as though that is what i am looking for
but i am not sure how you did that... i no how to create a report but am not sure how you did that with the query box were you type in the dates
if you could.. can you kindly tell me how you did it?
Thank You again
Regards Noor
 
Hi,

Although i am not sure if it is the best method, i managed to go about a similar solution by using the BuildCriteria function ... see this thread for more.

Also there are other suggestion by valuable members in that thread which may apply to your situation.

Goodluck

thank you very much
il check out the thread
Regards Noor
 
Box you see when you open the report is input box it get dates seperated by comma then seperates them and convert them to date format to be used as criterea for report

Criterea build up by the above method is then used to assign record source to the report using "in" criterea

Check code behind the report and read the function "getdates"
 

Users who are viewing this thread

Back
Top Bottom