I have a query that returns a count of the number of products a customer currently has. The query has a parameter that asks for the customer_id.
I want to use the query as the control source of a field on a form. I need the form to pass the currently selected customer_id (the one they are looking at) as the query parameter value. How is this done, or is there a better way to do this? The form only looks at a single customer (and therefore customer_id) per page. Query is below:
PARAMETERS contractor_name Short;
SELECT COUNT(contractor_leads.contractor_id) as [Actual Leads]
FROM contractor_leads
WHERE contractor_leads.contractor_id = contractor_name
AND contractor_leads.active = TRUE;
Thanks