Get Access Table Field Names and field types into Excel

pingme89

Board Regular
Joined
Jan 23, 2014
Messages
149
I have created an Excel application using an Access DB. Currently it is stable, and I need to replicate and create another Access DB.
I would like to be able to Import only the Fieldnames and Field Types of 3 Tables in Access. The Access Filename is "CCcalc.accdb"
It resides on my Desktop.
The table names are "QuoteLog", "ClientDB", and "InventoryDB"

I want to programmatically get the Field Name and Types onto a worksheet named "QLfields" , "Cfields", and "Ifields"
Then I would like to create a new Access Database with with the same Table Names, Field Names, and Field Types.

I am pretty proficient with Excel but and clueless when it comes to Access. Any help would be greatly appreciated.
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,019
Office Version
  1. 365
Platform
  1. Windows
So if you could loop through those 3 tables and get the field names and data types associated with those tables into an Access table, could you then copy/paste the Access datasheet into a spreadsheet - or link to it? To automatically populate a spreadsheet with that info would not be worth the coding effort if this was going to be a one time thing.
 

pingme89

Board Regular
Joined
Jan 23, 2014
Messages
149
Actually this will not be a one and done job. I have a whole department I need to customize their own Access DB with. But I need to create a blank Access DB for each and populate as many tables as possible after each with it's own data.
 

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,019
Office Version
  1. 365
Platform
  1. Windows
I am pretty proficient with Excel but and clueless when it comes to Access
I guess I'm a bit confused then. I thought you wanted to use Access code to get the table and field names and use those in a spreadsheet. Now I think you want to use Excel code to get table and field names from an Access db and populate Excel sheets with that. If you need to use Access code get Access table and field names in some sort of list I can help with that. If it is to be done from Excel then I don't think I'm up to it.
 

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,796
Office Version
  1. 2019
Platform
  1. Windows
If you import a spreadsheet into Access you get the field names and datatypes and tables created and everything else.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,280
Messages
5,600,702
Members
414,400
Latest member
Damocles2021

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top