If you want to delete the field or column in the table.
Here is the code-
Sub delete_column_using_query()
DoCmd.SetWarnings (False)
On Error Resume Next
' CLOSE THE TABLE IF ITS OPEN
DoCmd.Close acTable, "SALES_DETAIL", acSaveYes
' delete the field S_No
DoCmd.RunSQL "ALTER tABLE SALES_DETAIL DROP S_NO long"
DoCmd.SetWarnings (True)
End Sub
Download Access Database
No comments:
Post a Comment