>>>Thanks for the information Eric. Just one last question. I've been looking at the ADOX MSDN page and I can't find the column property that shows whether the field is required or not. Do you know how to get that?
>
>>Can you use Jet OLEDB:Allow Zero Length?
>
>I am using that for text fields but I need to know the Required property setting too. If you open an Access table in design view and look at the General Tab on the bottom there is a place for Required and Allow Zero Length for taxe fields but for other types of data you can set the Required but there is no option for Allow Zero Length.
>
>Other suggestions?
Using ADO OpenSchema method, you can check for the IS_NULLABLE field property. Here are some lines:
'pconConnection is a valid ADODB Connection
Set rstInfo = pconConnection.OpenSchema(adSchemaColumns, Array(Empty, Empty, "YourTableName", Empty))
strAttributes = strAttributes & _
IIf(rstInfo.Fields("IS_NULLABLE").Value, "", "Not ") & "Nullable" & vbCrLf
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com