Full Version: refer to control on same subform
UtterAccess Forums > Microsoft® Access > Access Forms
swaziman1
Hi,
I have 2 comboboxes on my subform , the second combobox is based on results from the first combobox , i am trying the following to refer to the first combobox but it doesn't appear to be working , can anyone suggest why?
[forms]![frmdeal].[frmoex]![cmbexchange]
thanks
dannyseager
CODE
me.cmbexchange

hould work
swaziman1
not working unfortunately , i'm trying to put this in the criteria field in the rowsource query of the second combo box.
Here's my sql.
CODE

SELECT tblOEXPriceType.MktID, tblMarket.Market
FROM tblOEXPriceType INNER JOIN tblMarket ON tblOEXPriceType.MktID = tblMarket.MktID
WHERE (((tblOEXPriceType.ExchangeID)=[me].[cmbexchange]))
GROUP BY tblOEXPriceType.MktID, tblMarket.Market;
pbaldy
And a handy reference on the syntax:
http://www.mvps.org/access/forms/frm0031.htm
swaziman1
Hi,
I've looked at this page before , what it shows to reference a scontrol in subform1 from subform1 is me.cmbexchange , however this doesn't seem to filter the results on the result of cmbexchange.
pbaldy
You're not in subform1, you're in a query (even though it's used in subform1). Use the "Not in these forms" syntax.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.