Referencing Field Properties InputMask and Format, using VB/VBA 
Author Message
 Referencing Field Properties InputMask and Format, using VB/VBA

You will get an error if you try to reference these properties for a
field that hasn't had any values assigned to them. But since you are
only interested in the ones that do have values, you can safely ignore
those errors. Something like this:

Public Sub GetProps()
  On Error GoTo Handle_Err
  Dim db As Database
  Dim tdf As TableDef
  Dim fld As Field
  Set db = CurrentDb
  For Each tdf In db.TableDefs
    For Each fld In tdf.Fields
      Debug.Print tdf.Name, fld.Name, _
       "Format:" & fld.Properties("Format")
      Debug.Print tdf.Name, fld.Name, _
       "InputMask:" & fld.Properties("InputMask")
    Next fld
  Next tdf
Exit_Here:
  Exit Sub

Handle_Err:
  Select Case Err.Number
    Case 3270 'Property Not Found
      Resume Next
    Case Else
      MsgBox Err.Number & _
       vbCrLf & Err.Description, , "Error"
  End Select
  Resume Exit_Here
End Sub

 -- Andy

Quote:

>Hi

>I am trying to document an Access database using some VB/VBA code and nwish
>to output to a text file the Input Mask (and Format) properties of the
>field.

>I am interating the TableDefs and Fields collection to get to the various
>objects properties, but cannot reference the InputMask and Format
>properties.

>Does anyone know how this can be achieved?

>TIA


>Consultant/Developer



Sun, 05 Aug 2001 03:00:00 GMT  
 Referencing Field Properties InputMask and Format, using VB/VBA
Hi

I am trying to document an Access database using some VB/VBA code and nwish
to output to a text file the Input Mask (and Format) properties of the
field.

I am interating the TableDefs and Fields collection to get to the various
objects properties, but cannot reference the InputMask and Format
properties.

Does anyone know how this can be achieved?

TIA


Consultant/Developer



Mon, 06 Aug 2001 03:00:00 GMT  
 Referencing Field Properties InputMask and Format, using VB/VBA
Hi

I am trying to document an Access database using some VB/VBA code and nwish
to output to a text file the Input Mask (and Format) properties of the
field.

I am interating the TableDefs and Fields collection to get to the various
objects properties, but cannot reference the InputMask and Format
properties.

Does anyone know how this can be achieved?

TIA


Consultant/Developer



Mon, 06 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Trouble adding InputMask property to fields...

2. Referencing fields in a .doc using VBA

3. Format Date field in query using VBA

4. Table and Field Properties using VBA

5. Help: I can't read the description property for Table fields using VBA

6. Reading the Custom Properties fields using VBA

7. field properties - unable to find Format/Caption or INputMask!

8. InputMask Property

9. Why No InputMask Property in VB6?

10. Create Access field with Inputmask

11. Changing Access Database Field Properties using VB

12. referencing the Description property of a Report or Form object in VBA

 

 
Powered by phpBB® Forum Software