Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax -Alter table

Status
Not open for further replies.

croiva25

Technical User
Joined
Dec 3, 2003
Messages
125
Location
AU
Syntax -Alter table
HI guys, I hope somebody has a suggestion to my problem

I need to alter a table(which I haven't done before) for my app. that is written in Visual Basic 6 using Access database.

I know the "formula" for altering the table,don't require that.

This is the code for creating the table

nErr = myObj.Modify(Handle, "CREATE TABLE LabelsPrinted ( CustomerID INT, PrintedWhen DATETIME, " & _
"DataRecorderCode VARCHAR(30), NumberBoxes INT, FirstBoxNbr VARCHAR(100), RecorderReturnedWhen DATETIME, " & _
"CONSTRAINT FK_CustomerID_001 FOREIGN KEY (CustomerID) REFERENCES CustomerDetails (CustomerID))")
If myObj.ReportError(Handle, nErr, "attempting to update the database. (v" & CStr(lVersion) & ")", App.title) Then
Exit Function
End If

What I am not sure here is what is the way I need to alter this table, how or where do I use the altering formula/syntax to acctually do this, I can seem to write it properly but I am not getting any errors nor is anything getting created.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top