Copy a field to another - same table

  • Thread starter Thread starter Darren
  • Start date Start date
D

Darren

I'm trying to create a button that will copy a set of date
fields to another set of dates fields, within the same
table.

So far I've created an update query as follows:

In the Update To cell for the fields you want to update,
type an expression with the following syntax:
[tablename].[fieldname]

((I've tried putting the fieldname only, since it's the
same table I'm trying to update))

where tablename and fieldname are the names of the table
and field that contain the data you're copying. For
example, if you are copying data from the ProductName
field in the Products table, you would type [Products].
[ProductName] in the Update To cell.

....although these steps are for copying the contents of
one table to another. I need this to work in the same
table.

....When this runs, it says that the record is being
updated, however it still shows as empty.

Any help is MUCH appreciated!!!
 
Hi Darren,

Field: Field1
Table: [TableName]
UpdateTo: [TableName].[Field2]

Should work. Test with a simple table and an Update Query without any
criteria. Most likely you might have a criteria in your Update Query that
causes the records not to be updated.

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights



--------------------
| Content-Class: urn:content-classes:message
| From: "Darren" <[email protected]>
| Sender: "Darren" <[email protected]>
| Subject: Copy a field to another - same table
| Date: Tue, 9 Mar 2004 08:26:21 -0800
| Lines: 30
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcQF80I89KPhzrIPRLuyUeSc1834XQ==
| Newsgroups: microsoft.public.access.queries
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.queries:192986
| NNTP-Posting-Host: tk2msftngxa08.phx.gbl 10.40.1.160
| X-Tomcat-NG: microsoft.public.access.queries
|
| I'm trying to create a button that will copy a set of date
| fields to another set of dates fields, within the same
| table.
|
| So far I've created an update query as follows:
|
| In the Update To cell for the fields you want to update,
| type an expression with the following syntax:
| [tablename].[fieldname]
|
| ((I've tried putting the fieldname only, since it's the
| same table I'm trying to update))
|
| where tablename and fieldname are the names of the table
| and field that contain the data you're copying. For
| example, if you are copying data from the ProductName
| field in the Products table, you would type [Products].
| [ProductName] in the Update To cell.
|
| ...although these steps are for copying the contents of
| one table to another. I need this to work in the same
| table.
|
| ...When this runs, it says that the record is being
| updated, however it still shows as empty.
|
| Any help is MUCH appreciated!!!
|
|
|
|
 
Back
Top