I have a query that I use on many forms to set the row source of a cascading combo box. I would ideally be able to copy/paste this set of combo boxes for use on multiple forms without having to edit the query. Is there a simple way to reference controls on the current form in a SQL select query?
My current query looks like this:
SELECT tblExample.ChildID
FROM tblExample
WHERE ((tblExample.ParentID)=[Forms]![frmExample]![CboParentID]);
I want to create something more general, like:
SELECT tblExample.ChildID
FROM tblExample
WHERE ((tblExample.ParentID)=Me![CboParentID]);
That way I don't have to edit [frmExample] every time I reuse this query. Is it possible to reference controls on the current form in a general way?
SELECT ChildID FROM tblExample WHERE ParentID=[CboParentID];Now copy/paste combobox. - June7