Solved

Extracting Access column names to Excel

Posted on 2004-08-13
4
357 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
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…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now