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

Pass a date variable to an append query

P: 3
How do I pass a date from a form to an append query in Access 2003 using DAO? I want to use a form and a combo box to choose the date and pass that date to an append query.

The date field in the query is MonthDate. The form name is frmArchive and a Macro is Running the query. The combo box is named cboArchiveDate. In the criteria for MonthDate Field I entered [Form]![frmArchive].[cboArchiveDate]. I keep getting prompted to enter the date when it should be getting it from the combo box. What am I doing wrong?
Jan 15 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,495
I'm not sure you can do this in a Macro, but you need to either :
1. Rebuild the query to include a literal value which is taken from cboArchiveDate.
2. Do it the way you're trying atm but you need the extra s in Forms :
Expand|Select|Wrap|Line Numbers
  1. [Forms]![frmArchive].[cboArchiveDate]
Jan 16 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.