Delete Syntax problem

hardrock

Registered User.
Local time
Today, 19:05
Joined
Apr 5, 2007
Messages
166
Hi all, can someone please help me get the syntax below right?
I'm loading the values of 2 text boxes, tabl and text10 from my form into the statement.

Many thanks

db.Execute "DELETE * FROM " & Me.tabl & " WHERE ID = ('" & Me.Text10& "');"
 
If the table name may contain spaces or special characters, add the square brackets.

If ID is a numeric field, remove the single quotes. Don't think you need to put the ID value in brackets.

db.Execute "DELETE * FROM [" & Me.tabl & "] WHERE ID = " & Me.Text10 & ";"

^
 

Users who are viewing this thread

Back
Top Bottom