With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
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
|MS accesss using VBA to change a default value||5||30|
|Storing Combo Box Selection in Table||12||45|
|After renaming tables, queries, forms in a database, VBA doesn't recognize the new names||14||21|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
26 Experts available now in Live!