Auto displaing data

D

David

I have a look up box that i select a part number from, then i want the
description to be dislpayed in the next text box.

I have a table with all the part numbers and descriptions listed
 
D

Damian S

Hi David,

Make sure that the query for the Parts combo box includes the description
field. Even if you set the width of the field to 0 so you don't see it in
the combo box.

Then, set the data value for the Text Box to display the description to:

=forms!frmName.cboParts.column(2)

The above example assumes that you have a query with 3 fields returned, the
ID, the Part Number and the Description.

Hope this helps.

Damian.
 
D

David

Thanks mate,
i dont mean to be a pain but could you please explaine how to include the
extra field.
 
D

Damian S

No worries... in your record source for your combo box, have somethnig like
this:

"select ID, PartsNumber, PartsDescription from tblParts order by PartsNumber"

Then, if you only want to display the PartsNumber for selection, set your
column widths to 0cm; 3cm; 0cm.

Hope that helps get it sorted!! Remember that when using the
combobox.Column(x) property, the columns start counting from 0.

Damian.
 
D

David

Thankyou very much
Regards Dave

Damian S said:
No worries... in your record source for your combo box, have somethnig like
this:

"select ID, PartsNumber, PartsDescription from tblParts order by PartsNumber"

Then, if you only want to display the PartsNumber for selection, set your
column widths to 0cm; 3cm; 0cm.

Hope that helps get it sorted!! Remember that when using the
combobox.Column(x) property, the columns start counting from 0.

Damian.
 
Top