Base your combobox on a query based on your product table. Include the fields
ProductID and ProductName. Set the bound column property to 1, column count to
2, and field width to 0;1.5. Place the combobox on the main form, name the
combobox, MyCombobox, and make it unbound.
Your subfrom needs to display records from a table that has ProductID as a
foreign key. Create a query based on this table and include the field ProductID
with the other fields you want to display in the subform. Put the following
expression in the criteria of the ProductID field:
Forms!NameOfMainForm!MyComboBox
When you select a product in the combobox, the subform will now display all the
records related to the product you chose.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com www.pcdatasheet.com
"martim07" <ma******@hotmail.com> wrote in message
news:85**************************@posting.google.c om...
How do I have a textbox on a subform automatically fill in with a
value after I select an item from a combo box on a form (e.g., select
a product name in a combo box and have the subform populate based on
THAT EXACT product name)?
I want the entire subform to populate based on the selection from the
combo box. Do I have to bind every textfield on the subform or only
the product name textbox?
Thanks for any information