Result listed in textbox is different from the item shown in the drop down list (1 Viewer)

Alvin85

Registered User.
Local time
Today, 23:30
Joined
Jul 7, 2018
Messages
17
Please help me with the following problem on miscosoft access

I have a drop down list named ddl_fine with the option <$2000, $2000 but <$5000. I m using a query to populate my ddl_fine

When I use a textbox to display what i had chose, it display a single number. Example: I selected <$2000. I expected the texbox to display <$2000 but it displayed 1 instead. It is reading the row correctly but anyway to make it display <$2000 instead of 1?
 

isladogs

MVP / VIP
Local time
Today, 16:30
Joined
Jan 14, 2017
Messages
18,209
Your combo has at least two columns.
The first, hidden, column is an ID field.
The second column is what you want.
As the column numbering is zero based, your textbox record source needs to be set using

Code:
Me.TextboxName = Me.Comboboxname.Column(1)
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:30
Joined
Feb 19, 2002
Messages
43,224
When you want to show data from a lookup table in a text box, modify your form or report's RecordSource query to join to the lookup table and select the text value rather than the id. The join should be a Left Join unless the value for the option is required.
 

Users who are viewing this thread

Top Bottom