Consulting

Results 1 to 2 of 2

Thread: New Record in Access with VBA

  1. #1

    New Record in Access with VBA

    Hi there,

    I am currently building a program in Excel whereby I can send data to and from an Access Database. I have copied in a segment of code that I use to update one table in the database...

    Set DBRecordSet = New ADODB.Recordset
        DBRecordSet.CursorLocation = adUseServer
        DBRecordSet.Open Source:="StaffData", ActiveConnection:=DBConnection, CursorType:=adOpenDynamic, LockType:=adLockOptimistic, Options:=adCmdTable
    ...however I want to modify this so it updates not just "StaffData" but "CustomerData" as well. How would I do this?

    Andy

  2. #2
    By creating a separate recordset that handles the customerdata. I assume you have some index field you can use to determine which records need to be changed.
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •