Bound Objects

klynch0803

Registered User.
Local time
Today, 10:55
Joined
Jan 25, 2008
Messages
102
How can I show a value in a text box that corresponds with what is selcted in a combo box.

I have a table that has two columns

tdatMeasurements

MeasurmentType
ActualMeasurement

On a form I place a Combo box Called "Combo4" and I add a text Box called "Text18".

Now Combo Box is equal to MeasurmentType and when I use the Combo Box to select the Measurment type I want it to show ActualMeasurment Value that coresponds in "Text18"
 
Code:
Private Sub Combo4_AfterUpdate()
  Me.Text18 = Me.Combo4.Column(1)
End Sub
 
Code:
Private Sub Combo4_AfterUpdate()
  Me.Text18 = Me.Combo4.Column(1)
End Sub

TY as this works but I forgot to mention the ID column. So I tried changing the (1) to (2) and got blank value even though a value exists, then changed to (3), (4) etc and I only get blank valuesas well... I know the second column value is 1 and the 2nd is 3 etc... If I leae it 1 as u declared above it returns the same value I selected and I actually need the vlue in the column beside the one I selected. AM I not changing the right value? I want the 3rd Column Value (2)..
 
Last edited:
List the columns form your combobox as they appear, from left to right.
 
TY I found the error..

In my Combo Box I was only showing the first two columns not all Columns therefore reulting in the combo box didnt recognize th column I wanted.
 

Users who are viewing this thread

Back
Top Bottom