View Full Version : New Record in Access with VBA

11-19-2008, 02:37 AM
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?


Jan Karel Pieterse
11-19-2008, 06:01 AM
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.