473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Updating field before append query

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
2 2356
-----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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rob Meade | last post by:
Lo all, I'm having a little bit of trouble (betty...). I have removed some of the obvious stuff from this example (like connections being opened/closed etc) I create a recordset in ASP (not...
5
by: deko | last post by:
How to run action query against linked table? I have an Access 2003 mdb with an Excel 2003 Workbook as a linked table. When I attempt to run an action query against the linked table I get this...
3
by: Steve Housechild | last post by:
I have a table of 'Customers', a table of 'Newsletters' and a table for storing which customers have recieved which letters 'CustLett'. By using a query, I have pulled a list of customers who...
1
by: Chris Jackson | last post by:
I'm a novice Access user and am not sure how to solve the following problem. Any help with the following would be greatly appreciated! I have two tables with identical structures, the first holds...
2
by: steve.turner | last post by:
Hi all, I'm hoping someone can stop me tearing (what's left of) my hair out over this problem... I have a linked Excel file from which I append the data to an empty local Access table. I...
1
by: prime80 | last post by:
I'm building a project database to keep track of the various engineering projects ongoing in our department. These projects will be grouped by priority (=High, Medium, Low) and ranked within the...
7
by: SHPsalm139 | last post by:
I'm working on a school application. I have a form where the user selects the marking period (1, 2, 3 or 4). That ties in to the "marking_period" field in a table. If the user indicates, for...
8
by: Chris A via AccessMonster.com | last post by:
I have an interesting problem that I have yet to come accross that I can't change data structure on because it is an export from filemaker I am reformatting for another dept. anyway. I have a table...
1
by: Norma.Caskey | last post by:
I am trying to figure out how to update a field in a table ONLY if it matches a criteria. In this example, I have a sales opportunity (with a unique identifier). Each month we pull the sales...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.