Nov 8, 2001 #1 Vidar13 IS-IT--Management Apr 4, 2001 90 US I know how to delete a table in a macro, but how would you do it with code? I would assume you would use "DoCmd.RunCommand acCmdDelete", but how would this be syntaxed to kill a table?
I know how to delete a table in a macro, but how would you do it with code? I would assume you would use "DoCmd.RunCommand acCmdDelete", but how would this be syntaxed to kill a table?
Nov 8, 2001 #2 ToeShot Programmer Sep 8, 2001 400 US dim sql as string sql = "DROP Table {table name};" DoCmd.RunSQL sql you could also do this DoCmd.RunSQL "DROP Table {table name};" if your table name is going to be a user input then "DROP Table " & {user input table name} & ";" HTH Upvote 0 Downvote
dim sql as string sql = "DROP Table {table name};" DoCmd.RunSQL sql you could also do this DoCmd.RunSQL "DROP Table {table name};" if your table name is going to be a user input then "DROP Table " & {user input table name} & ";" HTH
Nov 9, 2001 #3 DJN Technical User Jun 29, 2001 100 GB You could try, Private Sub Command36_Click() DoCmd.DeleteObject acTable, "TableName" End Sub Upvote 0 Downvote
You could try, Private Sub Command36_Click() DoCmd.DeleteObject acTable, "TableName" End Sub