By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,423 Members | 2,466 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,423 IT Pros & Developers. It's quick & easy.

passing values in query

P: n/a
hi!
i need little help in query

SELECT idate,idesc as payoutdesc, SUM(amount) as sum_AMOUNT ,COMMENTS
From payout WHERE IDATE Between #3/1/2006# And #3/31/2006 # and

idesc='COFFEE RED DIAMOND' group by idesc,idate,comments,amount

i need to pass values of dates (3/1/2006 and 3/31/2006) in query ,is
their any way i can pass those values ?
thanks for your help

Have a nice day

May 10 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You can specify parameters in the query, e.g.:
WHERE IDATE Between [StartDate] And [EndDate]

Access will then ask for the 2 values when the query runs.

If you wish, you can put a pair of text boxes on a form and use:
WHERE IDATE Between [Forms].[Form1].[txtStartDate]
And [Forms].[Form1].[txtEndDate]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<sr**********@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
hi!
i need little help in query

SELECT idate,idesc as payoutdesc, SUM(amount) as sum_AMOUNT ,COMMENTS
From payout WHERE IDATE Between #3/1/2006# And #3/31/2006 # and

idesc='COFFEE RED DIAMOND' group by idesc,idate,comments,amount

i need to pass values of dates (3/1/2006 and 3/31/2006) in query ,is
their any way i can pass those values ?
thanks for your help

Have a nice day

May 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.