My form Deals is based on query, lists securities' buy/sell deals and includes SecurityName, SecuritySymbol, DateOfDeal, PriceOfDeal etc.
The forms opens from another form Clients bearing the client name filter (it contains only the deals of the client, chosen in the Clients form), so it has subform with records of the deals and mainform which inherits the client name.
In the Deals subform I have an unbound combo-box SelectSymbol, which filters the form by selected security' deals.
SELECT [SecurityDetails].SecurityName, [SecurityDetails].SelectSymbol
FROM [SecurityDetails]
ORDER BY [SecurityDetails].SecuritySymbol;
Private Sub SelectSymbol_AfterUpdate()
Me.Filter = "SecurityName= '" & Me!SelectSymbol& "'"
Me.FilterOn = True
End Sub
The combobox, naturally, lists all the securities there are in the DB (thousands of records).
I would like to limit it to only the securities which are available int the current form Deals, shown for the chosen client (tens of records).
Tried to put criteria [Forms]![Deals ]![DealsSubform].[Form]![SecuritySymbol] in the combobox' Row Sours, but it limits the combobox list only to the 1st record.
Please help.