Hello All!
(this is a Form and a Query question, but I think the answer will come as a change to the query)
I have a query "qryQVVehsTD" that show the number of vehicles a lead has.
I have a continuous form "frmToDo" which shows a list of leads that have an open action, and each row shows (among many other things) how many vehicles the lead has. When frmToDo is a standalone form it works well, but I want it to be a subform on "frmHome"
I've changed the code to the following so I can use "frmToDo" as a subform, but I get #error
(this is a Form and a Query question, but I think the answer will come as a change to the query)
I have a query "qryQVVehsTD" that show the number of vehicles a lead has.
I have a continuous form "frmToDo" which shows a list of leads that have an open action, and each row shows (among many other things) how many vehicles the lead has. When frmToDo is a standalone form it works well, but I want it to be a subform on "frmHome"
Code:
SELECT Count(*) AS NumberOfVehicles
FROM dVehicle
WHERE (((dVehicle.LeadID)=[Forms]![frmToDo]![txtLeadID]));
I've changed the code to the following so I can use "frmToDo" as a subform, but I get #error
Code:
SELECT Count(*) AS NumberOfVehicles
FROM dVehicle
WHERE (((dVehicle.LeadID)=[Forms]![frmHome]![frmToDo].[Form]![txtLeadID]));