Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm somewhat familiar with updating from Excel to Access via VBA. How can I update to multiple tables in Access that have a one to many relationship using VBA. Table are linked via key. tbl_One is one Many with tbl_Two via Foreign Key tbl_One is one Many with tbl_Three via Foreign Key Set db = OpenDatabase("C:\LinkedTest\LinkTestDB.mdb") ' open the database Set rs = db.OpenRecordset("tbl_One", dbOpenTable) With rs ..AddNew ' create a new record ' add values to each field in the record .Fields("TableFieldName2") = Range("A1").Value .Fields("TableFieldName2") = Range("B1").Value .Fields("TableFieldName2") = Range("C1").Value Here I what to updated data to tbl_Two which linked to tbl_One Here I what to updated data to tbl_Three which linked to tbl_One .Update ' stores the new record End With Thanks Little Penny |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a Combobox in a Userform access multiple dynamic tables | Excel Discussion (Misc queries) | |||
Update multiple pivot tables | Excel Programming | |||
Use Excel to update Access tables | Excel Programming | |||
How to update ms access tables directly from ms excel? | New Users to Excel | |||
How to import multiple sheet of excel into Access database to a diffrent tables?? | Excel Discussion (Misc queries) |