text box values from combo box selection

cardgunner

Registered User.
Local time
Today, 11:18
Joined
Aug 8, 2005
Messages
210
In my form a have a combo box. I want 2 text fields to show the column 0 value and the column 4 value of the combobox. I have set the control source of the text boxes to =[Combobox_name].[Column](0) and =[combobox_name].[Column](4). This works untill I have selected a record in my combobox where there are duplicate records of column 0. the other combox box looks and records the value from the first set of records with the duplicate value.

If my records in the combo box are
1034, , , , 3
1258, , , , ,
1487, , , , ,
1034, , , , 5

And I select 1034, , , , 5 the 2 text boxes show 1034 and 3. I'm assumning they are showing this becuase it's the first record that begins with 1034. I want them to show 1034 and 5

the record source of the combobox is a union query. It combines a company table and company edit table.

Note: column 0 and 4 combined are a unique identifier.
 
Last edited:
Is there another unique identifier? Ideally a primary key and you could include that in the combo box query column? You can hide it then have the combox record source save that value instead of the two 1034.

Ex.

1...1034...3
2...1034...5

The record source will save either 1 or 2, whichever one the user chooses.
 
I created a unique identifier. In the query I combined the 2 fields together as the unique identifier. that has solved that. Thank you.
 

Users who are viewing this thread

Back
Top Bottom