combo box wrong field displayed

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

Guest

I have a combo box set up in a table for the field RawMatId that I pull onto
a query. It is displaying the following

RawMatId(Primary-autonumber)
Rawcode
rawdesc
Vendorname

on the drop down I want them to be able to type and scroll to the rawcode
since the autonumber is meaningless to them but necessary for table design (
1 vendor for raw matl)

I hid the Rawmatid and then they can scroll fine but the rawcode is what
displays in the RawMatid field-even though I said to bound column 1. I think
this would be confusing to them to see the rawcode in the RawMatid field.
Seems always to be confusing.

Please help,

Thanks,
barn
 
babs said:
I have a combo box set up in a table for the field RawMatId that I
pull onto a query. It is displaying the following

RawMatId(Primary-autonumber)
Rawcode
rawdesc
Vendorname

on the drop down I want them to be able to type and scroll to the
rawcode since the autonumber is meaningless to them but necessary for
table design (

I hid the Rawmatid and then they can scroll fine but the rawcode is
what displays in the RawMatid field-even though I said to bound
column 1. I think this would be confusing to them to see the rawcode
in the RawMatid field. Seems always to be confusing.

Please help,

RawMatID is column zero and it should be the bound column. The code and
description if needed would be displayed from a query relating the tables.
Rawcode is column 1.
 
thanks for the help - but the user needs the other fields to help them select
the correct RawMatId. RawMatid is bound and is column 0 but I want them to
be able to type in the Rawcode and scroll to IT but put in that combo box the
value of the RawMatId. Bottom line need to see the rawcode and other fields
to help with selection.
Tried Making Rawcode combo box but since can have many vendors for same code
get odd errors since RawMatid is a primary key?

Please help,
Barb
 
I have a combo box set up in a table for the field RawMatId that I pull onto
a query. It is displaying the following

RawMatId(Primary-autonumber)
Rawcode
rawdesc
Vendorname

on the drop down I want them to be able to type and scroll to the rawcode
since the autonumber is meaningless to them but necessary for table design (

I hid the Rawmatid and then they can scroll fine but the rawcode is what
displays in the RawMatid field-even though I said to bound column 1. I think
this would be confusing to them to see the rawcode in the RawMatid field.
Seems always to be confusing.

You can use the ColumnWidths property to *display* one field while
*storing* a different one. Try the following properties:

Control Source: RawMatID

Rowsource: SELECT RawMatID, RawCode, RawDesc, VendorName
FROM RawMaterials
ORDER BY RawCode;

Bound Column: 1

ColumnWidths: 0; .5; 1.25; 1.25

or whatever widths show the three visible fields appropriately; the
trick is to set the ColumnWidth of the RawMatID to zero.


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top