Hi everyone.
I'm having some bother with a delete query on a form I've built.
On the form is a text box which contains a unique ID. I would like to be able to delete the whole record that corresponds to that unique ID from the table that it is linked to.
So far my code looks like this:
I've also put in a plain message box after the query to show me it's triggering. The problem is that the sub appears to be working, however the table isn't altered. There aren't any error messages being advised and the message box triggers away fine but the record isn't being deleted.
The Unique ID is lifted directly from the table when the form loads so it's not an error inputting it.
It has me stumped. Any advice you can provide would be much appriciated.
I'm having some bother with a delete query on a form I've built.
On the form is a text box which contains a unique ID. I would like to be able to delete the whole record that corresponds to that unique ID from the table that it is linked to.
So far my code looks like this:
Code:
StrQuery = "Delete FROM TblSubmissions " & "WHERE tblSubmissions.[Unique ID] = " _ & Forms("Submit").TxtID & ";"
The Unique ID is lifted directly from the table when the form loads so it's not an error inputting it.
It has me stumped. Any advice you can provide would be much appriciated.
Comment