Can I filter a subform combo from a textbox value on form

  • Thread starter Thread starter Jim Brooks
  • Start date Start date
J

Jim Brooks

Is it possible to filter a subform combo from a textbox value on the main
form. I have looked through the Access forum but have not found any help. If
this can be done can the answer be as simple as poss as I am just getting
into Access 2007.
Many thanks in advance
Jim Brooks
 
Thanks Ken done the trick
Jim Brooks

KenSheridan via AccessMonster.com said:
Set the RowSource of the combo box to reference the text box on the parent
form, e.g.

SELECT MyField FROM MyTable WHERE MyOtherField = Parent!MyTextBox ORDER BY
MyField;

And requery the combo box in the parent form's Current event procedure and in
the text box's AfterUpdate event procedure with:

Me.MySubformControl.Form.MyComboBox.Requery

Note that MySubformControl should be the name of the subform control in the
parent form which houses the subform, not the name of its underlying form
object, unless both have the same name of course.

Ken Sheridan
Stafford, England



--
Message posted via AccessMonster.com


.
 
Back
Top