SELECT type question

J

JohnE

I am writing a SELECT statement behind a cmdbutton. The
action is to do some filtering based on selections made in
3 comboboxes. I have the following info:
SELECT (table fields here)
FROM (table name here
WHERE (client code here)
AND (status here)
AND (subprocess here)
AND (team member here)
ORDER BY (date here)

The info in ( ) is for my use and not what is actually in
the statement.
It works if I remove one AND line out. So, I guess my
question is can you only have the WHERE and 2 AND's in a
SELECT statement? How would I get a third AND in there?
Thanks for any info on this.
*** John
 
F

fredg

JohnE said:
I am writing a SELECT statement behind a cmdbutton. The
action is to do some filtering based on selections made in
3 comboboxes. I have the following info:
SELECT (table fields here)
FROM (table name here
WHERE (client code here)
AND (status here)
AND (subprocess here)
AND (team member here)
ORDER BY (date here)

The info in ( ) is for my use and not what is actually in
the statement.
It works if I remove one AND line out. So, I guess my
question is can you only have the WHERE and 2 AND's in a
SELECT statement? How would I get a third AND in there?
Thanks for any info on this.
*** John

John,
What doesn't work? Incorrect records? No records? An Error Message?

You can have many more AND's.
I suspect you have a problem within the AND statement itself.
Post your complete Where clause, copied and pasted from the original
SQL, and include the datatypes of the fields used in it (Text,
True/False, Number, etc.).
 
J

JohnE

Fred, thanks for the response. Just before I opened up
your response, I got it to work. I actually went back thru
and retyped it in. Not sure what I missed the first time
but I must have typed it in the second time.
Again, thanks for the response.
*** John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top