Hi, JR.
Is there a Macro that can do this?
No. A Macro can't do this, but as Rick says, an update query will. If you
want to change a whole batch of records so that they have identical
expiration dates, then create a new query and open the SQL View pane, then
copy and paste one of the following SQL statements into it:
1.) This will only update records for the current year:
UPDATE tblMyTable
SET ExpiresDate = #12/31/2005#
WHERE (Year(SomeDate) = 2005);
2.) This will update every record in the table, regardless of the year:
UPDATE tblMyTable
SET ExpiresDate = #12/31/2005#;
Next, replace tblMyTable with the name of your table, ExpiresDate with the
name of your "Expiration Date" field, and 12/31/2005 with the date you'd like
to set these records to all at once. If you're using the first SQL
statement, then replace SomeDate with the name of your own date field which
contains a value indicating that the record is for this year, and replace
2005 with whatever year that needs the records' expiration date changed.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.