aqif
Registered User.
- Local time
- Today, 18:21
- Joined
- Jul 9, 2001
- Messages
- 158
Hi 
I am trying to create a code by which I can append the field properties in a seperate table to get database report. I have been able to get Tables and field names along with thier descriptions and other properties. I can't seem to find any way to find out that whether the field is primary key or indexed or no. Lets look at my sample simplified code
'---------------------------------
On Error Resume Next
Dim db As DAO.Database
Dim Rst As DAO.Recordset
Dim tblName As TableDef
Dim fldName As DAO.Field
Set db = CurrentDb
strTableName = "TblTables"
For Each fldName In db.TableDefs(strTableName).Fields
MsgBox (fldName.Name)
Msgbox (fldName.Properties("Description")
Msgbox (fldName.Properties("Required")
Next
'----------------------------------------
What I want to do is to get something like
Msgbox (fldName.Properties("Primary") or
Msgbox (fldName.Properties("Index") etc
Any suggestions?
Cheers!
ÙÇãá

I am trying to create a code by which I can append the field properties in a seperate table to get database report. I have been able to get Tables and field names along with thier descriptions and other properties. I can't seem to find any way to find out that whether the field is primary key or indexed or no. Lets look at my sample simplified code
'---------------------------------
On Error Resume Next
Dim db As DAO.Database
Dim Rst As DAO.Recordset
Dim tblName As TableDef
Dim fldName As DAO.Field
Set db = CurrentDb
strTableName = "TblTables"
For Each fldName In db.TableDefs(strTableName).Fields
MsgBox (fldName.Name)
Msgbox (fldName.Properties("Description")
Msgbox (fldName.Properties("Required")
Next
'----------------------------------------
What I want to do is to get something like
Msgbox (fldName.Properties("Primary") or
Msgbox (fldName.Properties("Index") etc
Any suggestions?
Cheers!
ÙÇãá