PLease hlelp me

S

SStone

Hello, I have a question.

I want to be able to display, query, list, or etc. for all
the field names and data elements associated for a table
in Access 97 called tbl_libraryPatrons. I know Access 97
has a feature called documenter. However, I wanted to able
to do this through code.


How do I do it?
 
S

ScottE

Try smething like this to get all the field properties.
The table has properties, too, but this should get you
started:


Sub FieldProperties()
On Error Resume Next
Dim theTbl As Object
Dim fld As Object
Dim prop As Object

Set theTbl = CurrentDb.openrecordset("Table1")
For Each fld In theTbl.Fields
For Each prop In fld.Properties
Debug.Print fld & ", " & prop.Name & ", " & prop.Value
Next prop
Next fld
theTbl.Close
Set theTbl = Nothing
End Sub

Hope this helps!
 

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

Top