Dear,
I have got a main form (Main) and a subform (Subform). Subform is showing all records from table Holiday in a Continuous Form. The Id of each record is set to Visible=No. Next to each record, I want to add a command button which deletes the corresponding record when pressed using the execution of a Query in the On click event.
The query looks like:
DELETE *
FROM [Holiday]
WHERE Id=Forms![Main].[Subform].Forms![Id];
But a pop-up keeps appearing indicating that it cannot found the referenced Id ....
Can anyone tell me how the Where statement must be corrected?
PS: when manually providing the pop-up msg with an id, the corresponding record is deleted correctly, so the only thing that is wrong is the Where statement (I think)