Sub CreateAutonumber()
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "CREATE TABLE Customers2 " & _
"(CustomerID AUTOINCREMENT (100000,1), " & _
"CompanyName TEXT (50), IntroDate DATETIME, " & _
"CreditLimit CURRENCY DEFAULT 5000)"
cmd.Execute
End Sub
|