Text Boxes dependant on Combo boxes

dark11984

Registered User.
Local time
Tomorrow, 05:53
Joined
Mar 3, 2008
Messages
129
I'm trying to get to three text boxes on my form to be dependant on a combo box. I can get TxtPop to work but not the other two.

I thought i had done this before and had problems. but i'm not sure why its not working this time.

If i change the columns for TxtProdcd & TxtDescription to column 2 it works, but when i cahneg back to column 3 & 4 nothing happens.

Any ideas?

Code:
Private Sub CboPONo_AfterUpdate()
    Me!TxtPop = Me!CboPONo.Column(2)
    Me!TxtProdCd = Me!CboPONo.Column(3)
    Me!TxtDescription = Me!CboPONo.Column(4)
End Sub

Cheers
 
Just in case...

.Column(0) is the true first column
.Column(1) is the second column
.Column(4) is the fith column, etc...

Is there really any values in all those columns?
 
Also make sure the Column Count property of the combo is set appropriately.
 
I have found that if your column count does not match your underlying query you can "lose" the values...

IE if your row source has 5 rows and you only want to see 1
Instead of:
column count = 2
0;2.5
Use
Column Count = 5
0;2.5;0;0;0
 
Fastest fingers in the west! :p
 
column count fixed it... I should've known that! thanks guys
 

Users who are viewing this thread

Back
Top Bottom