combo box display

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

Guest

Hi there

I'm not sure if this can be done or not...On an order form I have 2 combo boxes, one for part number and the other for description.The idea is the user could order by part number or description. What I would like to do is if they use the part number combo box, can the description combo be updated with the description based on the part number chosen and vise versa if they use the description to order, then display the associated part number in the part no combo box. If this can't be done (easily) does anyone have another idea for this

Thanks in advance
Shawna
 
Why not use 1 combo and concatenate the two fields into one? I use this
technique often. Instead of the combo box only showing for ex. "Heineken", I
add (concatenate) the volume to it, since there is more than one size
bottle. The sql would look like this:
SELECT ProdID, [ProdName] & " - " & [ProdVol] As Product FROM tblProducts;
With the bound column [ProdID] set to 0, the combo displays:
Heineken - 0,20
Heineken - 0,33
Heineken - 0,50
.....but the underlying table actually only stores ProdID.

The way you are proposing is a bad idea. The only thing you should be
entering into the order form is the unique identifier from your parts table.
The other fields are redundant and just waste space. You can pull the other
fields into a report using a query.

Jeff

Shawna said:
Hi there,

I'm not sure if this can be done or not...On an order form I have 2 combo
boxes, one for part number and the other for description.The idea is the
user could order by part number or description. What I would like to do is
if they use the part number combo box, can the description combo be updated
with the description based on the part number chosen and vise versa if they
use the description to order, then display the associated part number in the
part no combo box. If this can't be done (easily) does anyone have another
idea for this?
 
Sorry, I should have clarified that. Should have said that you only need one
control for the Part. Other fields in the order form are likely required.

Jeff
 
Shawna said:
I'm not sure if this can be done or not...On an order form I have 2 combo boxes, one for part number and the other for description.The idea is the user could order by part number or description. What I would like to do is if they use the part number combo box, can the description combo be updated with the description based on the part number chosen and vise versa if they use the description to order, then display the associated part number in the part no combo box. If this can't be done (easily) does anyone have another idea for this?


This sounds like it should be straightforward for bound
combo boxes. The part number combo's RowSource query would
be something like:

SELECT partnum
FROM tblparts
ORDER BY partnum

with its ControlSource bound to the part number field in the
order details table. Set the combo's ColumnCount to 1 and
BoundColumn to 1.

The description combo box's RowSource query would be like:

SELECT partnum, partdescription
FROM tblparts
ORDER BY partdescription

with ControlSource also bound to the part number field in
the order details table. Set this combo's ColumnCount to 2,
BoundColumn to 1 and ColumnWidths to 0;
 
Back
Top