Posted on 2003-03-11
How to drop a table from Access mdb? My program work in this way;
I delete records from a table, then drop the whole table from mdb.
Where the table name is key-in by users. My coding as below, but
is working! pls assist.
sqlDelBData = "delete * from " & Trim(txtYear.Text)
rs2.Open sqlDelBData, cn1, adOpenForwardOnly, adLockOptimistic, adCmdText
'Drop a table
sql = "Drop table " & Trim(txtYear.Text)
sql = "Drop unique index indLotNo"
sql = sql & " on " & Trim(txtYear.Text) & "(LotNo)"
sql = sql & " with primary"