Newbee here with what may be a simple question...
How do I conditionally add a NEWFIELD to an EXISTINGTABLE when the NEWFIELD does not already exist in the EXISTINGTABLE? I found the CreateField method in VBA help but I am not sure how to use it. I am thinking it could be used like shown below.
Also, I am not sure how to test if the NEWFIELD already exists and what to do about the 'expression' part of the code. Probably need a couple of DIM statements too.
Any advice would be appreciated.
[vba]
Sub CreateNewField ()
If FieldAlreadyExists Then
Exit Sub
Else
expression.CreateField(NEWFIELD , Text, 30)
End If
End Sub
[/vba]