Database/Table Properties

  • Thread starter Thread starter Paul Bruneau
  • Start date Start date
P

Paul Bruneau

Hi All,

I have a table loaded in Access with only a few records, but many many
different columns. By the time I manage my way to the end of a record,
I've long forgotten any detail from the beginning of the record.
Perhaps "Duhhh" but there are more than 50 fields

It would be really great if I could print the list of fields, like in
the old DOS based data propgrams.

Anybody remember this?

FieldName Type Length
Name Character 25.0
Address Character 20.0
Sales Numeric 10.2
Date Date 8.0

Can I print this sort of list from within Access?

If so... how?

Thanks Much

Paul
 
Why not build a form to enter the data? As far as your
question goes. There is a documenter available in access
that generates a report with all your table
field/relationship/property data in it. It is available
under Tools-->Analyze-->Documenter.

Kyle Denison
 
From the Tools menu, select Analyze, then Documenter.

Better still, create a form based on your table so you have more control
over the layout.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Hi Paul,

Try these procedures. The first one writes the results to a file named Fields.txt in your default
directory defined in Access. The second one writes a similar file to the same folder that the
database is located in.


Tom
________________________________

Option Compare Database
Option Explicit

Sub EnumerateTablesAndFieldsAndType()
' Code provided by Michael Freeland, 2/4/2004, to DL AccessDevTalk
' Subject = "RE: Enumerating Field Order in Import Spec File in MSysIMEXColumns"

Dim intloop, intloop2 As Integer
Open "Fields.txt" For Output As 1
'
On Error Resume Next
' Print information about TableDefs collection.
Debug.Print CurrentDb.TableDefs.Count & " TableDefs"
Write #1, CurrentDb.TableDefs.Count & " TableDefs"
For intloop = 0 To CurrentDb.TableDefs.Count - 1
Debug.Print "Table " & intloop & " Name =" & CurrentDb.TableDefs(intloop).name
Write #1, "Table " & intloop & " Name =" & CurrentDb.TableDefs(intloop).name
For intloop2 = 0 To CurrentDb.TableDefs(intloop).Fields.Count - 1
Debug.Print "Table " & intloop & " Field " & intloop2 & " Name = " _
& CurrentDb.TableDefs(intloop).Fields(intloop2).name _
& " & Type = " & CurrentDb.TableDefs(intloop).Fields(intloop2).Type
Write #1, "Table " & intloop & " Field " & intloop2 & " Name = " _
& CurrentDb.TableDefs(intloop).Fields(intloop2).name _
& " & Type = " & CurrentDb.TableDefs(intloop).Fields(intloop2).Type
Next intloop2
Next intloop
Close #1
End Sub


Sub EnumerateTablesAndFieldsAndType2()
' Slightly modified version of the above code

Dim intloop, intloop2 As Integer
'Open Fields.txt" in the current folder for Output As 1
Open CurrentProject.Path & "\Fields.txt" For Output As 1
'
On Error Resume Next
' Print information about TableDefs collection.
Debug.Print CurrentDb.TableDefs.Count & " TableDefs"
Write #1, CurrentDb.TableDefs.Count & " TableDefs"
For intloop = 0 To CurrentDb.TableDefs.Count - 1
Debug.Print
Write #1, ""
Debug.Print "Table " & intloop & " Name =" & CurrentDb.TableDefs(intloop).name
Write #1, "Table " & intloop & " Name =" & CurrentDb.TableDefs(intloop).name
For intloop2 = 0 To CurrentDb.TableDefs(intloop).Fields.Count - 1
Debug.Print " Field " & intloop2 & " Name = " _
& CurrentDb.TableDefs(intloop).Fields(intloop2).name _
& " & Type = " & CurrentDb.TableDefs(intloop).Fields(intloop2).Type
Write #1, " Field " & intloop2 & " Name = " _
& CurrentDb.TableDefs(intloop).Fields(intloop2).name _
& " & Type = " & CurrentDb.TableDefs(intloop).Fields(intloop2).Type
Next intloop2
Next intloop
Close #1
End Sub
________________________________


Hi All,

I have a table loaded in Access with only a few records, but many many
different columns. By the time I manage my way to the end of a record,
I've long forgotten any detail from the beginning of the record.
Perhaps "Duhhh" but there are more than 50 fields

It would be really great if I could print the list of fields, like in
the old DOS based data propgrams.

Anybody remember this?

FieldName Type Length
Name Character 25.0
Address Character 20.0
Sales Numeric 10.2
Date Date 8.0

Can I print this sort of list from within Access?

If so... how?

Thanks Much

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top