I am trying to delete the existing table called "test".
See the last 3 lines of the script below.
(I am showing the full script in the unlikely event that it is relevant).
The "drop table test" is not accepted as a valid command.
It goes yellow in the editor indicating an error.
Why ?
Option Compare Database
Private Sub Command10_Click()
[Mobile] = Forms!Control.[ID]
End Sub
Private Sub Command11_Click()
[Mobile] = [ID]
End Sub
Private Sub Command12_Click()
DoCmd.RunSQL "DROP TABLE test"
End Sub
See the last 3 lines of the script below.
(I am showing the full script in the unlikely event that it is relevant).
The "drop table test" is not accepted as a valid command.
It goes yellow in the editor indicating an error.
Why ?
Option Compare Database
Private Sub Command10_Click()
[Mobile] = Forms!Control.[ID]
End Sub
Private Sub Command11_Click()
[Mobile] = [ID]
End Sub
Private Sub Command12_Click()
DoCmd.RunSQL "DROP TABLE test"
End Sub