I have designed forms that in several areas l need to input a contact name which l have a combo box for. What l want is for the list to only include contacts for that company, how do l do this?
I'll assume that the table with contacts is linked to the customer table. Add the customer table to the query the combobox is based on. Place the customer id field on the QBE grid and set it's criteria to the customer id field of the form(if the field isn't actually displayed on the form you'll need to add it, you can hide it by setting it's visible property to No. This is necessary as you are not addressing the field but a control). Then in this field's criteria use the following syntax to limit the list choices:
Forms!FormName!FieldName
In the combobox's Got Focus property requery the combobox:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.