M
mxp
I am trying to figure out how i can run an access query in excel an
change the date range of the query without altering the query itself.
i have written the query
PHP code
-------------------
SELECT Payments.id, Payments.Name, Payments.PaymentID, Payments.PaymentDate, Payments.`ex vat`, Payments.`ex vat`*0.175 AS 'vat', (Payments.`ex vat`*0.175)+Payments.`ex vat` AS 'total'
FROM table
WHERE (Payments.PaymentDate<={ts '2004-12-01 00:00:00'} And Payments.PaymentDate>={ts '2004-08-01 00:00:00'}
-------------------
and have managed to successfully import the data into excel. What i
the easiest way to allow a date range to be added without the need t
alter the query ie is it possible to pass variables to the query - s
the query would be something like
PHP code
change the date range of the query without altering the query itself.
i have written the query
PHP code
-------------------
SELECT Payments.id, Payments.Name, Payments.PaymentID, Payments.PaymentDate, Payments.`ex vat`, Payments.`ex vat`*0.175 AS 'vat', (Payments.`ex vat`*0.175)+Payments.`ex vat` AS 'total'
FROM table
WHERE (Payments.PaymentDate<={ts '2004-12-01 00:00:00'} And Payments.PaymentDate>={ts '2004-08-01 00:00:00'}
-------------------
and have managed to successfully import the data into excel. What i
the easiest way to allow a date range to be added without the need t
alter the query ie is it possible to pass variables to the query - s
the query would be something like
PHP code