MS Query

  • Thread starter Thread starter TedGrier
  • Start date Start date
T

TedGrier

I'm using Access 2002 to read data from SQL Server. I
have a basic query that works fine:
SELECT Count(*) From Orders WHERE SALE_DATE='6/20/2004'

Now I need the user to be able to change the date, but
cannot get the query to read a cell vaule. I think it
should work something like:

SELECT Count(*) From ORders WHERE SALE_DATE='Sheet1'!B5

Does anyone have an example of how this should be done?

THANK YOU
 
I think this will work:

SELECT Count(*) From Orders WHERE
SALE_DATE=Worksheets("Sheet1").Range("B5").Value



--
Michael J. Malinsky
Pittsburgh, PA

"I am a bear of very little brain, and long
words bother me." -- AA Milne, Winnie the Pooh
 
Sorry, that does not work.

What seems to ALMOST work is a [Parameter1] field, then
assigning the paramter to read values form a cell.
However, I am haveing trouble reading date values into
the parameter.

Any suggestions on how to do this?

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

Back
Top