Force a value in an unbound combo box (1 Viewer)

Greyowlsl

Mlak Mlak
Local time
Today, 20:21
Joined
Oct 4, 2006
Messages
206
Hi,

Ive got a database with a combo box, called "combo1" (with 2 columns). It is unbound but uses a query as its row source. When i select a value in combo1 is places the data from combo1.column(1) into a textbox (text1). I then click the next record button (button1) and it then keeps the same value in combo1 because it is unbound. So i need it that when i go to the next record it displays the value in combo1 that relates to text1.

Thanks for you time,
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:21
Joined
Feb 28, 2001
Messages
27,320
You might be able to do this by adding event code to the OnCurrent event if you are otherwise bound to a recordset for the rest of the form. You would have to do your forcing there. Let's say the bound column is a number and you can get the correct number from the bound recordset. Just copy the correct number to the combo box's bound column - which is to say, to the combo box itself, because the value of the combo box is the value of its bound column if you don't specify anything else.
 

Users who are viewing this thread

Top Bottom