Having trouble with ADO to run a access query From Excel

M

Mike

Hello This may not be were I in need to post this ? If its not can someone
tell me where to post. The Where is my problem. The SQL below is in access
and I have a form to pick the between Receiving.RECEIVE_DATE. I would Like
to use my form in Excel to pick the between Dates Can anyone help

SELECT DISTINCTROW Receiving.RECEIVE_DATE, Receiving.INVOICE_NUMBER,
Receiving.RPT_GROUP1, Receiving.DEPT_GRP, Sum(Receiving.COST) AS [Sum Of
COST], Receiving.VENDOR_ID, Sys_Pram.STORE_NAME
FROM Receiving, Sys_Pram
WHERE (((Receiving.RECEIVE_DATE) Between
[Forms]![frmDatePicker]![txtStartDate] And
[Forms]![frmDatePicker]![txtEndDate]+1)
GROUP BY Receiving.RECEIVE_DATE, Receiving.INVOICE_NUMBER,
Receiving.RPT_GROUP1, Receiving.DEPT_GRP, Receiving.VENDOR_ID,
Sys_Pram.STORE_NAME;
 
M

Mike

I have got what i need for now Ty. I ment a form within Excel. Is it possible
to use the Access Form?

Jamie Collins said:
Hello This may not be were I in need to post this ? If its not can someone
tell me where to post. The Where is my problem. The SQL below is in access
and I have a form to pick the between Receiving.RECEIVE_DATE. I would Like
to use my form in Excel to pick the between Dates Can anyone help

SELECT DISTINCTROW Receiving.RECEIVE_DATE, Receiving.INVOICE_NUMBER,
Receiving.RPT_GROUP1, Receiving.DEPT_GRP, Sum(Receiving.COST) AS [Sum Of
COST], Receiving.VENDOR_ID, Sys_Pram.STORE_NAME
FROM Receiving, Sys_Pram
WHERE (((Receiving.RECEIVE_DATE) Between
[Forms]![frmDatePicker]![txtStartDate] And
[Forms]![frmDatePicker]![txtEndDate]+1)
GROUP BY Receiving.RECEIVE_DATE, Receiving.INVOICE_NUMBER,
Receiving.RPT_GROUP1, Receiving.DEPT_GRP, Receiving.VENDOR_ID,
Sys_Pram.STORE_NAME;

Do you mean, "I would like to use my Access form from within Excel to
pick the between Dates," or do you mean, "I have an Excel form to pick
the between Dates and I want to pass the parameter values to my SQL
procedure"? TIA.

Jamie.
 

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