Alright. I give...
I have combed through these forums and tried a very simple delete query in VBA a couple different ways. I can't seem to get it. I have an unbound combobox on my form whose source is a two column form name and form ID (form id is the bound column). I have a button that I would like to run a delete query that deletes the Form with the ID that matches what is in the drop down (a unique ID).
Currently I have,
however, I have tried the DoCmd.RunSQL (DoCmd.RunSQL ("DELETE * FROM reftblform WHERE reftblform.FormID =" & Me.cbofrmfilter; "), and I have tried defining a string and running the string
each way has given me an error of some sort. Most commonly, and in the one above, it says there is a syntax error in my FROM clause. I tried putting it down below with &_ to the same error...
can someone please tell me why this incredibly simple SQL statement is having troubles?
:banghead:
K
I have combed through these forums and tried a very simple delete query in VBA a couple different ways. I can't seem to get it. I have an unbound combobox on my form whose source is a two column form name and form ID (form id is the bound column). I have a button that I would like to run a delete query that deletes the Form with the ID that matches what is in the drop down (a unique ID).
Currently I have,
Code:
CurrentDb.Execute _
"DELETE FormID FROM reftblform" & _
"WHERE (reftblform.ScoreID=" & Forms!frmformmgt.cbofrmfilter & ")"
however, I have tried the DoCmd.RunSQL (DoCmd.RunSQL ("DELETE * FROM reftblform WHERE reftblform.FormID =" & Me.cbofrmfilter; "), and I have tried defining a string and running the string
each way has given me an error of some sort. Most commonly, and in the one above, it says there is a syntax error in my FROM clause. I tried putting it down below with &_ to the same error...
can someone please tell me why this incredibly simple SQL statement is having troubles?
:banghead:
K