Update Query with date criteria

G

Guest

Can someone please help?

I've modified a update query to only update from a specified date in the
criteria field, this is run along with a delete and append queries, this is
to import data from one DB to Another, however if I remove the criteria this
works fine, but as soon as as I put a criteria in the underlying query I get
a Error 3061 message, can one of you good people please help me out coz this
is driving me nuts.

MTIA
 
A

Allen Browne

You have a name in the query (in the Criteria row?) that Access cannot
resolve.

If you run the query manually, it will ask for a parameter. To execute the
query in code you would have to supply the parameter value before you
attempt the execute.
 
G

Guest

Oh ok any ideas on how to do that? this is to limit the update query to
recent changes and not all records.
 
A

Allen Browne

If you wanted the changes in the last 30 days, you could put this into the
Criteria row of your query under the date field:
 
G

Guest

That works great but assuming I wanted to go back say 6 months or so would
changing the 30 to 180 have the right sort of effect?
 
G

Guest

This works if I add a minus sign to the 30 otherwise itwas looking at the
next month MTIA
 

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