Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Criteria

Status
Not open for further replies.

Bickertk

Programmer
Aug 26, 2002
23
0
0
GB
I have a table with months in, i.e. Jan, Feb, Mar and so on. I have made a Query for a report and I want to enter criteria to enter the month for choosing the records I want to see.

I know how to do this with dates but not in this case. Can anyone help.

Cheers
 
Hi

Do not really understand what you don't understand, making query criteria with months is pretty much the same as with dates, except if you are making the SQL string in code you bound the value with '' instead of ##

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Sorry ken I may not be making it clear.

When I put [Enter Month] in the criteria box I get a popup box and hit the button for the report.

When I put Jan in I get nothing. What I really want are the records that have Jan set against them.

Regards
 
Hi

In the Query, does the column actually have a month ie Jan, FEb etc, or does it have a date. It will not automatically compare a date with a month and get a match.

If were using Month Numbers (1-12) then making a calculated column so xMonth:Month(datDateCol) and comparing that with an enetered Month Number would work.

Am I on tract of have I missed the point? Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi

Sorry for the delay in my reply. In the table I have Jan, Feb, March,Etc. So its the same in the query. I do not want ot compare Date, i.e 00/00/00 with month , i.e. Jan.


I want to type in my popup box Jan, feb, march, etc and that what it finds.

Regards
 
Hi

So you make a combo box with a list of options Jan;Feb:Mar..etc

In your query you make the criteria

Forms!MyForm!cboMonth

Using you Form and Control names of course

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top