Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
Public Sub CreateInvoiceTable() Dim cat As ADOX.Catalog Dim tbl As ADOX.Table 'Create and connect a catalog object Set cat = New ADOX.Catalog cat.ActiveConnection = CurrentProject.Connection On Error Resume Next 'If the table already exists, delete it cat.Tables.Delete "tblInvoice" On Error GoTo 0 'Create the table definition in memory Set tbl = New ADOX.Table tbl.Name = "tblInvoice" 'Create the new columns tbl.Columns.Append "InvoiceNo", adVarChar, 10 'Create the remaining columns tbl.Columns.Append "InvoiceDate", adDBDate tbl.Columns.Append "CustomerID", adInteger tbl.Columns.Append "Comments", adVarChar, 50 Debug.Print tbl.Name 'Append the new table to the collection cat.Tables.Append tbl 'Error occurs here cat.Tables.Refresh Application.RefreshDatabaseWindow 'Clean up cat.ActiveConnection = Nothing Set tbl = Nothing Set cat = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.