I have a form with a cancel button. I want to erase some data from my table if user clicks cancel. So in the sub cmdCancel_Click(), I call the sub DeleteData as
But it shows as a compile error: expected: =
I don't understand why this happens as the DeleteData sub is declared in a common module as public.
Can anyone help?
Public Sub DeleteData(TableName As String, aDate As Date)
Dim strSQL As String
strSQL = "DELETE * FROM " & TableName & " WHERE Cstr([Date]) = '" & aDate & "'"