Results 1 to 2 of 2
  1. #1
    dandoescode is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    85

    Using Recordset rst.AddNew

    So recordsets appear to be a very powerful tool in access. I'm interested to know if it is possible when using the recordset AddNew command, to insert a field value from another open recordset.



    Basically, would a line of code like

    Code:
    rstDataOutputFinal.AddNew
       rstDataOutputFinal![TableName1] = rstDataOutPut!TableName1
    rstDataOutputFinal.Update
    update my DataOutputFinal table, with a value from my table DataOutPut? DataOutPut and DataOutputFinal would have already been opened and moved to the desired records.

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    There is no problem with that - your code looks fine. You can also use rst.Edit - rst.Update if the record in rstDataOutputFinal already exists and you have moved to it.

    John

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

Similar Threads

  1. Update or CancelUpdate without AddNew or Edit
    By westcoastbmx in forum Forms
    Replies: 5
    Last Post: 11-07-2019, 09:01 PM
  2. Replies: 2
    Last Post: 03-08-2012, 12:59 PM
  3. How to code in AddNew Button In Access DBA
    By ganeshvenkatram in forum Access
    Replies: 0
    Last Post: 07-07-2011, 02:50 AM
  4. Replies: 9
    Last Post: 04-01-2011, 10:31 AM
  5. Replies: 3
    Last Post: 03-07-2011, 08:37 PM

Tags for this Thread

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