OpenDatabase() on the file name.
Table names are in MSysObjects.
Loop through the TableDefs to show the field names and types.
An example of how to list the fields, types, and descriptions for tables:
http://allenbrowne.com/func-06.html
This is a more comprehensive example:
http://allenbrowne.com/AppIssueChecker.html
Illustrates how to:
- choose a database, and OpenDatabase;
- loop through the TableDefs, and examine each field, including the names
and properties of the database, tables, and fields;
- do a bunch of other stuff as well.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"G Gerard" <gg*****@nbnet. nb.cawrote in message
news:KN******** ************@ur sa-nb00s0.nbnet.nb .ca...
>
I am trying to connect to a msaccess database and then create a list of
the objects in that database (more specifically the tables) and then
create a list of the fields (including the field type) for each table.