In this article I will explain how you can create textboxes in an Access form that will be filled based on the value selected from a combo box and a Table.
The Access form has multiple textboxes and a single combo box. The user will be able to select a value from the combo box. Based on the value selected from the combo box, the text boxes will be populated with data from a Table.
Consider the table below:
The table name is:
The table has 5 fields:
We want to create the following form:
The user can select an ID from the combo box, and the fields will be updated accordingly: Result:
I have previously explained about populatingcombo boxes with values from a table in the article below:
[Combo17 is the name selected for the combo box in this example. The expression [Combo17].[Text] returns the current value selected in the combo box. The expression & Str([Combo17].[Text]))converts the value in the combo box to a string variable and concatenates it to the rest of the criterion string.
Repeat steps 1, 2 and 3 for the rest of the text boxes using the expressions below.