Query criteria cannot reference subform

stretch66

Racing towards the start
Local time
Today, 13:17
Joined
Sep 28, 2005
Messages
72
Hi,

Trying to run an append query for a specific record on a subform but won't recognise the subform control.

The Master form is fmSickEdit do I have to reference the Master file in the SQL?

The SQL for the query is:

INSERT INTO tblDisLetter ( SickID, DateAdvisedDisciplinary )
SELECT tblSick.SickID, Date() AS [Date]
FROM tblSick
WHERE (((tblSick.SickID)=[Forms]![fmsubSickListEditVersion]![SickID]));


Thanks
 
Tried this in the criteria but still didn't work.....anyone?

[Forms]![frmSickEdit]![fmsubSickListEditVersion].[Form]![SickID]
 
Use the code builder to get the Form/subform references correct
 

Users who are viewing this thread

Back
Top Bottom