Results 1 to 2 of 2
  1. #1
    captdkl02 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    33

    Question VB script to update Access database from specific cells in Multiple Excel Workbooks

    Access database table was created from importing 6 Excel Workbooks with multiple tabs via a Visual Basic Script. All 6 Excel workbooks all had identical field structure. I wrote a VBA script to create the Access table. The initial ACCESS table contained 502 records and 38 columns (fields). The Access table still is 502 records, but has increased the number of fields to 60.
    I need write a VB script to update the Access database table from the original 6 Excel Workbooks with multiple tabs only from fields that have been updated within the 6 Excel workbooks with multiple tabs (sheets). Each Workbook contains 3 or more tabs (sheets). Each Excel sheet contains 1 to many rows and the 38 columns (fields). My office personnel want to update the data in the Access database via Excel workbook and the personnel do not have Access database on their desktops. The “requirement number” field is unique both in Access and Excel workbook worksheet. However, the “requirement number” field is not in the same physical column location in Excel table and Access table.
    Keep in mind the Access record contains 60 fields and the Excel Workbook Worksheet contains 38 fields (subset of the Access table).
    I showed a physical example of changes in Excel and how is corresponds to Access table field changes. Note: The 1st row is a header for both Excel and AccessClick image for larger version. 

Name:	Table.GIF 
Views:	15 
Size:	8.1 KB 
ID:	10648

    I am looking for visual basic coding examples that will meet my requirements.
    Thank you.
    Last edited by captdkl02; 01-09-2013 at 03:14 PM. Reason: Added table image

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    VBA code not absolutely necessary if you can set dynamic links to the Excel sheets. If so, then use UPDATE sql actions to modify the data in the Access tables. Field arrangement in Access table (or linked worksheet) is irrelevant.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 22
    Last Post: 12-29-2015, 10:41 PM
  2. Replies: 12
    Last Post: 12-17-2012, 12:47 PM
  3. Export Table in Access 2007 to Multiple Workbooks in Excel 2007
    By hutchinsm in forum Import/Export Data
    Replies: 5
    Last Post: 03-01-2012, 05:23 PM
  4. exporting access report to specific excel cells
    By grgold14 in forum Import/Export Data
    Replies: 1
    Last Post: 02-07-2012, 04:38 PM
  5. Import Specific Cells from Excel to Access
    By Evocube in forum Import/Export Data
    Replies: 2
    Last Post: 01-12-2012, 10:35 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