I have a quirk with my Access app that I cannot debug. I have a form that essentially makes an insertion into a 'completed' table and a deletion from a 'pending' table. Design preferences aside, this is how I'm doing it rather than having some sort of 'Status' column.
I'll summarize my code with the relevent lines.
First it makes the insertion into the completed table, then the simple deletion:
qr = "DELETE * FROM tblPendingClasses WHERE ((tblPendingClasses.ID = " & curr & "));" 'build the query
Debug.Print qr
MsgBox (qr)
dbMine.Execute qr, dbFailOnExecute
Form.Refresh 'refresh,requery
Form.Requery
MsgBox ("Class review complete.")
docmd.close
The query is built fine, from the debug statement and msgbox, but it just doesn't do anything. I look at the table for pending classes, and the class with the ID I'm trying to delete is just sitting there. No meaningful errors, nothing. This used to work, and works sometimes, but is not working at the moment.
Ideas?
currvariable? Also, what is it forIDfield intblPendingClasses. If it is not a number, you will need to put's arround thecurrvariable, like so:((tblPendingClasses.ID = '" & curr & "'));"