[AccessD] How do I programatically see if a field exists in table. If not add it?

Boogie Loogie boogieloogie at gmail.com
Thu Dec 2 13:59:33 CST 2004


Hi

I have a an A97 db and am trying to write some code to check to see if
 field exists. If it does not I need it added. Right now I am lost.
Please help.

CODE THUS FAR:

If tdfChiz.Fields("dump").Name = "dump" Then
    AppendDeleteField tdfChiz, "DELETE", "dump"
    AppendDeleteField tdfChiz, "APPEND", "dump", dbBoolean
Else
    AppendDeleteField tdfChiz, "APPEND", "dump", dbBoolean
End If

If the field "dump" does not exist right now I get an error telling as
such. I don't need an error message I need the field added if it does
not exist :)

BTW AppendDeleteField is a function I got from the help menu. It works
fine in case you are wondering.

Thanks

BL



More information about the AccessD mailing list