Solved

Extracting Access column names to Excel

Posted on 2004-08-13
4
361 Views
Last Modified: 2012-06-27

Is there a way by which I can copy the names of columns from Access into an Excel file. What i basically need to do is review several columns in several tables in one DB. If I could get a list of all these columns into Excel it wouldreally make things easy for me.

Is there a quick way to do this?

Thanks,
KM
0
Comment
Question by:KalluMama
4 Comments
 
LVL 1

Accepted Solution

by:
adsmk2003 earned 500 total points
ID: 11793993
yes, you could create a copy of the table with the columns (within access) and then run a delete query on that table to empty it.  Then you could export that table to an excel spreadsheet....
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 11794012
0
 
LVL 5

Expert Comment

by:Emanon_Consulting
ID: 11794115
If you're looking for a quick and dirty way to get the names of the fields in excel then what I might suggest is...
Create a query for the table(s) you want in excel like this

SELECT tblValue.ValueID, tblValue.FName, tblValue.LName, tblValue.DollarValue
FROM tblValue
WHERE (((tblValue.ValueID) Is Null));

In the ID field for the table all you need to do is place Is Null in the Criteria.  This will display all results where there is NO DATA in the tables primary key field meaning no records/data will be displayed.

Then just use the Office Links to Analyze it with MS Excel.  This is found under Tools then Office Links.


Hope that works for you
Cheers
Michael
0
 
LVL 4

Expert Comment

by:Colonel32
ID: 11794652
This will drop all the tables and all their fields into your debug window. You can simply copy that into any other medium you wish to - Excel included :)

For Each tbl In CurrentDb.TableDefs

    Debug.Print tbl.Name
    Debug.Print "---------"
    For Each fld In tbl.Fields
        Debug.Print fld.Name
    Next fld
    Debug.Print vbLf
   
Next tbl
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question