KalluMama
asked on
Extracting Access column names to Excel
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://p2p.wrox.com/topic.asp?whichpage=1&TOPIC_ID=10265鎎
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
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
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
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