How Can I setup two Where Conditions?

Y

Yuji

Hi,
I am sure this is just a syntax issue, but please help me.
I am using OpenReport Action in Macro, where I have two arguments.
I have to select the range of date and customer no.
So I have to put two Where Condition statement in there, but any of what I
did did not work.
Does anyone know how to do this?

Thank you
 
T

tina

it's easier to help you fix your expression if we can see it. pls post the
expression you tried in the Where Condition line.
 
I

Immanuel Sibero

Hi Yuji,

I have not used the OpenReport Action in Macro. It does look like there is
only one line that says Where Condition. But I think you can enter multiple
conditions on this line. Use the AND or OR operators as appropriate. For
example (assuming the fields dtDate is of Date type and CustomerNo is of
Number type):

[dtDate] between #1/1/2004# AND #12/31/2004# AND [CustomerNo] = 1

HTH,
Immanuel Sibero
 
K

Ken Snell [MVP]

Immanuel is correct. You just build the WHERE clause as you would in a
query, but then delete the WHERE word.

--

Ken Snell
<MS ACCESS MVP>

Immanuel Sibero said:
Hi Yuji,

I have not used the OpenReport Action in Macro. It does look like there is
only one line that says Where Condition. But I think you can enter multiple
conditions on this line. Use the AND or OR operators as appropriate. For
example (assuming the fields dtDate is of Date type and CustomerNo is of
Number type):

[dtDate] between #1/1/2004# AND #12/31/2004# AND [CustomerNo] = 1

HTH,
Immanuel Sibero




Yuji said:
Hi,
I am sure this is just a syntax issue, but please help me.
I am using OpenReport Action in Macro, where I have two arguments.
I have to select the range of date and customer no.
So I have to put two Where Condition statement in there, but any of what I
did did not work.
Does anyone know how to do this?

Thank you
 

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