How do I make specific item automatically appear?

S

Ssantore

I have a table, Supply Requisitions. How do I make one of my fields, Item
Number, automatically display the correct number when choosing Supply Item
(another field) from a combo box? Is this even possible?
 
P

Pat Hartman \(MVP\)

The no-code solution is to base the form on a query that joins the two
tables. That will allow you to choose fields from both tables to display on
the form. When using this method, it is good practice to set the Locked
property to Yes for any columns chosen from the lookup table. This prevents
them from being accidentally updated from this form.
 
J

John W. Vinson

I have a table, Supply Requisitions. How do I make one of my fields, Item
Number, automatically display the correct number when choosing Supply Item
(another field) from a combo box? Is this even possible?

One simple way - if I understand your table structure correctly - is to
include the Item Number in the combo's row source query. It can be displayed
in the combo dropdown, or concealed by setting the ColumnWidths property so
that the column is of zero width - doesn't matter which.

Then set the Control Source of a textbox on the form to

=comboboxname.Column(n)

where n is the zero-based index of the column containing the item number.

John W. Vinson [MVP]
 
Top