G
Guest
I need to add some fields to an existing table in the database. I have tried
implememting the following code in a module. But when I run the code I can
step through with no errors but my existing table is not updated with the new
field. What am I missing? Thanks in advance.
Dim cat As ADOX.Catalog
Dim POTotals As ADOX.Table
Set POTotals = New ADOX.Table
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
POTotals.Name = "POTotals"
With POTotals.Columns
.Append "Test", adInteger
.Refresh
End With
With cat.Tables
.Refresh
End With
Application.RefreshDatabaseWindow
implememting the following code in a module. But when I run the code I can
step through with no errors but my existing table is not updated with the new
field. What am I missing? Thanks in advance.
Dim cat As ADOX.Catalog
Dim POTotals As ADOX.Table
Set POTotals = New ADOX.Table
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
POTotals.Name = "POTotals"
With POTotals.Columns
.Append "Test", adInteger
.Refresh
End With
With cat.Tables
.Refresh
End With
Application.RefreshDatabaseWindow