Showing data from other table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form for creating an order. The from has a combobox which is related to the table Products. The table Orders is off corse related to the table Products. Now when is select the product in the combobox, I want to see the related ProductDescrition from the table Products in a textbox near the combobox. I don't need the Description for anything, it's just for extra information use. Can someone help me please? Thank you!

Greetings Marti
 
You need to change the comboBox's RowSource SQL to
something like
"SELECT productIdcolumn, productDescriptioncolumn FROM
YourProductsTable;
You will need to change productIdcolumn,
productDescriptioncolumn and YourProductsTable to suit your
database.
Also, change the ColumnCount to 2 and possible change the
Column widths if you want the productdescription to be seen
from the drop-down.

In the comboBoxs AfterUpdate eventhandler, put code
something like

productDescriptionTextBox.Value = productComboBox.Column(1)

You will need to change productDescriptionTextBox and
productComboBox to suit your form.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I have a form for creating an order. The from has a
combobox which is related to the table Products. The table
Orders is off corse related to the table Products. Now when
is select the product in the combobox, I want to see the
related ProductDescrition from the table Products in a
textbox near the combobox. I don't need the Description for
anything, it's just for extra information use. Can someone
help me please? Thank you!
 
Back
Top