Workbook showing button to run main application |
- List the contained tables
- List the fields of a selected table
- Import the data into the workbook
The workbook contains macros and has a vba reference to Microsoft DAO 3.6 Object Library. My file is set up for Office 2003 on a 64 bit Windows 7 machine. It maybe necessary to change the reference if it cannot be found.
Main Dialogue box |
Open db shows a file dialogue box to select an mdb file to open. Sample mdb file can be found with my materials library. Once a file has been selected a dialogue box displays showing the tables inside the data base file.
A single table can then be selected. Then the fields belonging to that table can be displayed or the data in the table can be imported into the workbook. The data is not linked, it is copied into the workbook.
Tables found inside the mdf |
Any case there are benefits to using MS Access to store data and retrieve using DAO. For example retrieving section properties more directly by name rather than by column number. Though it is possible to write complex formula and use Vlookup to get properties by name. (eg. get section properties like Ixx, Iyy). This is the approach used by my AS4600 cold-formed steel design spreadsheet. Using vlookup tables is fine if just dealing with a single section and single segment, but when dealing with an entire building with many elements then DAO is the simpler more efficient option. {Or some alternative data base.}
Fields belonging to the selected table |
The worksheet can be found here: dbExperiments.xls
Other Approach to Viewing mdb Files in Office without MS Access
For a better view and querying of MS Access files look in the Microsoft office folder and find the main executable file for MS Query (MSQRY32.EXE for Office 2003). This uses .dqy files which are simple text files which can be edited with notepad or other plain text editor.
MS Query |
ODBC Data Source Administrator |
Revisions:
[19/06/2014] Original
[23/04/2016] Changed download links to MiScion Pty Ltd Web Store