Query Question

C

carl

I use this query...

TRANSFORM Sum(Nz([PC Vol]/2,0)+Nz([BD Vol]/2,0)+Nz([MM Vol]/2,0)) AS
Expr1
SELECT OCC_Data.underlying, Sum([PC Vol]/2)+Sum([BD Vol]/2)+Sum([MM
Vol]/2) AS OCC_Vol
FROM OCC_Data
WHERE (((OCC_Data.date)=[EnterDate yyyymmdd]) AND ((OCC_Data.Product)
In ('OSTK','OIND'))) and OCC_Data.underlying Not In
('VIX','SPX','OEX','DJX')
GROUP BY OCC_Data.underlying
PIVOT OCC_Data.exchange In ("A","B","C","I","P","Q","W","X","Z");

Which prompts me for a date. Is there a way to change the query so
when the user gets prompted to enter a date, that the can enter
20110410 for April 19 2011 OR enter 201104 and get all records for
April 2011.

Thanks in advance.
 
Top