Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Set field descr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 30431 of 31576
Post > Topic >>

Set field description via ADOX

by mouac01@[EMAIL PROTECTED] Jun 2, 2008 at 11:39 AM

I can't set the field description property with the code below.  I get
the error "Item cannot be found in the collection corresponding to the
requested name or ordinal".  Any ideas.  TIA...

Sub Test()
    Dim cat As ADOX.Catalog
    Dim tbl As ADOX.Table
    Dim col As ADOX.Column

    Set cat = New Catalog
    cat.ActiveConnection = CurrentProject.Connection
    Set tbl = New ADOX.Table
    With tbl
        .Name = g_sTable
        'code to get oFlds object not shown
        For Each oFld In oFlds.Rows
            Set col = New ADOX.Column
            col.Name = oFld("FIELDNAME")
            'error occurs here
            col.Properties("Description").Value = oFld("FIELDTEXT")
            .Columns.Append col
        Next
    End With
    cat.Tables.Append tbl
    Set col = Nothing
    Set tbl = Nothing
    Set cat = Nothing
End Sub
 




 3 Posts in Topic:
Set field description via ADOX
mouac01@[EMAIL PROTECTED]  2008-06-02 11:39:32 
Re: Set field description via ADOX
The Frog <Mr.Frog.to.y  2008-06-04 01:14:07 
Re: Set field description via ADOX
mouac01@[EMAIL PROTECTED]  2008-06-05 17:20:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:27:08 CST 2008.