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

Updating field before append query

P: n/a
I have a form that shows a single record based on a query criteria.
When I click a button it is set to use an append query to copy that
record to a separate table, then deletes the record from the first
table. Both tables have a 'DateTime' field that shows when it was last
updated using the Now function.

What I am trying to do is get the 'DateTime' field updated after the
append query copies it to the new table. I have tried updating the
DateTime in the first table before coping the record, but the new time
doesn't get saved in the first table before the record gets copied.

Is there a way to do this, either by getting the DateTime to save in the
first table before the record gets copied? Or by using code to write a
new DateTime in the second table after it gets copied? The 2nd table is
not in the original query to select the single record, only in the
append query that happens after I click an "OK" button on the form.

Many thanks to whomever can help me with this! even if they just point
me in the direction of what to look for!

Thanks,
Ray
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Set up the DateTime column in the second table w/ a default of Now() or
Date(). When you append the data to the second table, do not include
the DateTime column data. When the append happens the DateTime value
will be the date & time you appended the row (the default).

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQlQfUIechKqOuFEgEQKNiACg2rqphM14J/WEkeHtGa0t8FAVuvwAoOTM
Aka4Uc3ZTFxeXDt5bsyvunlk
=N6OP
-----END PGP SIGNATURE-----
Ray Holtz wrote:
I have a form that shows a single record based on a query criteria. When
I click a button it is set to use an append query to copy that record to
a separate table, then deletes the record from the first table. Both
tables have a 'DateTime' field that shows when it was last updated using
the Now function.

What I am trying to do is get the 'DateTime' field updated after the
append query copies it to the new table. I have tried updating the
DateTime in the first table before coping the record, but the new time
doesn't get saved in the first table before the record gets copied.

Is there a way to do this, either by getting the DateTime to save in the
first table before the record gets copied? Or by using code to write a
new DateTime in the second table after it gets copied? The 2nd table is
not in the original query to select the single record, only in the
append query that happens after I click an "OK" button on the form.

Many thanks to whomever can help me with this! even if they just point
me in the direction of what to look for!

Nov 13 '05 #2

P: n/a
Thank you MGFoster, that will work great for what I need.

MGFoster wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Set up the DateTime column in the second table w/ a default of Now() or
Date(). When you append the data to the second table, do not include
the DateTime column data. When the append happens the DateTime value
will be the date & time you appended the row (the default).

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.