In trying to create an Access column in a linked table I get the error "Operation is not supported in linked tables"
Is there a way to do this where the tables are linked
Sub oCheck_Add_Columns()
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim blnFieldExists As Boolean
Set dbs = CurrentDb()
Set tdf = dbs.TableDefs("Ammunition")
For Each fld In tdf.Fields
If fld.Name = "CreatedDTG" Then
blnFieldExists = True
Exit For
End If
Next
If Not blnFieldExists Then
Set fld = tdf.CreateField("CreatedDTG", dbDate)
fld.DefaultValue = "=Now()"
tdf.Fields.Append fld
End If
End Sub
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.