M
Matt
Hi,
Does anyone out there know how to set the Format property of a column
through code? I found one that sets the Required property to No, so I
know it must be possible.
In case you want to see it, here's my code:
Function CapCallMerge()
Dim cg As New ADOX.Catalog
Dim tb As New ADOX.Table
Dim cn As ADODB.Connection
Dim cl As ADOX.Column
Dim fFormat As Property
Dim CapCall As Field
Set cg.ActiveConnection = CurrentProject.Connection
tb.Name = "CapCallMergeSource"
tb.ParentCatalog = cg
With tb
With .Columns
.Append "Investor Name"
.Append "ID#"
.Append "Title"
.Append "Contact Name"
.Append "Salutation"
.Append "Company"
.Append "Address"
.Append "Address2"
.Append "City"
.Append "State"
.Append "Zip"
.Append "Fund"
.Append "Date Due"
.Append "Capital Call Amount", adCurrency, 30
.Append "Committed Capital", adCurrency, 30
End With
End With
For Each cl In tb.Columns
cl.Attributes = adColNullable
Next cl
cg.Tables.Append tb
End Function
Does anyone out there know how to set the Format property of a column
through code? I found one that sets the Required property to No, so I
know it must be possible.
In case you want to see it, here's my code:
Function CapCallMerge()
Dim cg As New ADOX.Catalog
Dim tb As New ADOX.Table
Dim cn As ADODB.Connection
Dim cl As ADOX.Column
Dim fFormat As Property
Dim CapCall As Field
Set cg.ActiveConnection = CurrentProject.Connection
tb.Name = "CapCallMergeSource"
tb.ParentCatalog = cg
With tb
With .Columns
.Append "Investor Name"
.Append "ID#"
.Append "Title"
.Append "Contact Name"
.Append "Salutation"
.Append "Company"
.Append "Address"
.Append "Address2"
.Append "City"
.Append "State"
.Append "Zip"
.Append "Fund"
.Append "Date Due"
.Append "Capital Call Amount", adCurrency, 30
.Append "Committed Capital", adCurrency, 30
End With
End With
For Each cl In tb.Columns
cl.Attributes = adColNullable
Next cl
cg.Tables.Append tb
End Function