Results 1 to 2 of 2
  1. #1
    Patience is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2010
    Posts
    52

    Write 3 values to the same record in different table

    Hi guys,



    OK, so now I want 3 field values from Table A to be written to 3 identical fields in Table B. All 3 values belongs to the same record in both tables.


    Code:
    Private Sub Form_AfterUpdate()
    On Error GoTo Err_Form_AfterUpdate
    Dim SQL_Text As String
    SQL_Text = "Insert into [Abrasion] ([Item number]) Values(""" & [Item number] & """);"
    CurrentDb.Execute SQL_Text, dbFailOnError
    Exit_Form_AfterUpdate:
       Exit Sub
    Err_Form_AfterUpdate:
       
       Resume Exit_Form_AfterUpdate
    End Sub
    This code works perfect for copying a single value to Abrasion. What shall I write if I in addition to the Item number value also want value B and value C to be copied as well to the same record in a different table (Abrasion)?

    Thanks a lot!

    BR

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    set up an AppendQuery using regular query design method..... when working correctly - then select the SQLview option.....that will give you the syntax you need.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 04-04-2010, 05:26 PM
  2. ODBC table read to blank Access table write
    By dibblejon in forum Access
    Replies: 2
    Last Post: 03-10-2010, 08:39 AM
  3. New record take on all values of prior?
    By cps6568 in forum Access
    Replies: 3
    Last Post: 01-12-2010, 04:14 PM
  4. How to write field values next to each other?
    By Petefured in forum Programming
    Replies: 2
    Last Post: 09-23-2009, 02:39 PM
  5. Parse a File from a Directory and write data to table
    By galahad in forum Database Design
    Replies: 0
    Last Post: 04-23-2009, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums