Field connected to combobox in form - base

I want to put a field on a form, so that i can select one item from a combobox and this field retrieves the possible items from a table. How to do this?

You can do this using a filter. Attached is a sample. There are two tables - Bike (main table containing Bike info) and Filter (just one record used to hold listbox selection).

There are two forms - Bike (to enter data for the main table) and the one you’re interested in Bike2.

The Bike2 form has a main form and a subform. On the main form is the listbox. The list is generated from the Bike table ID’s (see the Data tab of the properties box in MainForm) and the selection is stored in the first record of the Filter table. The remainder of the controls reside on the subform named SubForm. The subform points to the Bike table and is linked to the Filter table (see the Data tab of the properties box in SubForm). When you press the button, the subform is Refreshed (set in button property General tab), and using the BikeID in the Filter table, reads the record in the Bike table and displays it.

Sample: SelectByFilter.odb

I too have been struggling with this.
The answer given is for a list box where it clearly asks for a combo box.
I looked at the example and the bike2 form is what I need but in combo box NOT list box.

Thanks, but this is not an answer, which is the box you typed this into. Please move this comment and put it into a comment below the answer to which it refers. Then remove this answer. Thanks.

@BrettsExpress There are some minor differences between a list & combo box. For this question those differences are not relevant. It operates the same regardless of the type used.

The main differences between the two - With a combo box you can enter items even if they are not part of the list & list box you cannot; In a list box the value displayed and the saved value can be different but not in a combo box.

Any further questions should be asked as a new question.

I call what you’re doing a lookup. You’re looking up a value for a field in your primary table, from a list of values given in another table.

In Base a combobox returns the value you select from a list. Note that it can’t return the ID or any other field from the table you lookup into… (Note that in Access a combobox can do this.)

A listbox can return the ID of the values you see.

For example:

If you have a lookup table called colors, with these records:


Then in your primary table you can select one of these values with a pull down box by using a combobox. The combobox field in this case will need to be some sort of text field.

OR, If you have a lookup table called colors, with these records:

--- -----------
1   Red
2   Blue
3   Green

Then in your primary table you can have an integer field, and use a 1listbox` to lookup a name and return it’s id. So when you pull down the box, you see: Red, Blue, … but when you select Blue, it puts 2 in the field.