How can I specify two criterias in a column based in another colum

L

ldiaz

I have a query like this:
Base ID - PlannerCode - W-Date
12545 JAXM-06 8/12
12546 BAM-06 8/13
12547 DGM-05 8/12
12548 ATM-05 6/12

the [W-Date] shows all datas with want dates 30 days behind based in current
date
this is the statement I'm using for:
WHERE (((qry_DispatchTable.[W-Date])>=Date()-30))

I would like to have a condition to have still the same datas on
PlannerCode: JAXM-06, BAM-06, DGM-05 but on the PlannerCode : ATM-05 I would
like to show -90 days behind.

can you help me on that? I have tried a statement but it does not wrok as I
want.

Thanks
 
K

KARL DEWEY

Try this ---
WHERE (qry_DispatchTable.[W-Date]>=Date()-30 AND (PlannerCode = "JAXM-06" OR
PlannerCode = "BAM-06" OR PlannerCode = "DGM-05")) OR
(qry_DispatchTable.[W-Date]>=Date()-90 AND PlannerCode = "ATM-05")
 
L

ldiaz

Great!

That works perfectly!

Thanks
--
Lorenzo Díaz
Cad Technician


KARL DEWEY said:
Try this ---
WHERE (qry_DispatchTable.[W-Date]>=Date()-30 AND (PlannerCode = "JAXM-06" OR
PlannerCode = "BAM-06" OR PlannerCode = "DGM-05")) OR
(qry_DispatchTable.[W-Date]>=Date()-90 AND PlannerCode = "ATM-05")

--
KARL DEWEY
Build a little - Test a little


ldiaz said:
I have a query like this:
Base ID - PlannerCode - W-Date
12545 JAXM-06 8/12
12546 BAM-06 8/13
12547 DGM-05 8/12
12548 ATM-05 6/12

the [W-Date] shows all datas with want dates 30 days behind based in current
date
this is the statement I'm using for:
WHERE (((qry_DispatchTable.[W-Date])>=Date()-30))

I would like to have a condition to have still the same datas on
PlannerCode: JAXM-06, BAM-06, DGM-05 but on the PlannerCode : ATM-05 I would
like to show -90 days behind.

can you help me on that? I have tried a statement but it does not wrok as I
want.

Thanks
 

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