Sorry for late. I don't know how you can set the combo box row source to :
[Forms]![frmAccMastBuy]![AccID] ?
1. Try change your combo box row source to:
SELECT [AccID] FROM [tblAccMastBuy];
(you may have to change "tblAccMastBuy" to appropriate table/query name.)
2. Make sure to requery the Combo box in the subform after the Combo box in
the main form is updated, e.g: Me.[SubRegions].Form![Combo1].Requery
If you cannot solve it, please tell us more about your Tables, queries,
forms name etc...
Hope this help.
Banterista said:
1. The combo box row source is [Forms]![frmAccMastBuy]![AccID]. The SQL is
:-SELECT Regions.RegID, Regions.RAccRef, Regions.Region, Regions.RegCode
FROM Regions
WHERE (((Regions.RAccRef)=[Forms]![frmAccMastBuy]![AccID]))
ORDER BY Regions.Region;
2. The link between the forms is [AccID] on the master and [BAccref] on the
child.
3. I have an unbound combobox control on the main form that finds the
account the user requires and the account number is in [AccID]. It is AccID
that drives the filter for the subform population.
Thanks.
Khoa said:
Hi Banterista,
Could you tell us something more:
1. What is your Combo box's Row Source,
2. Does the subform link to the main form via Link Child Fileds/Link Master
Fields, what is the link ?
3. What number in the Combo box's Column Count/Column Widths ?
etc ...
The more you describe, the more we can help you.
Good luck.
:
I want to be able to display list values in a combo box within a subform that
are filtered by a control field in the main form. No matter how I reference
the control filed in the main form, I either get no data displayed in the
combo box or all the items available in the combo box with no filtering. I've
also tried setting up the same control in the subform and that doesn't work
either. I know about how to reference filds on forms and subforms. Please
help!!!