Just another error message

G

Guest

I need some attention!
Bug says "invalid use of null"
Private Sub ShowValue(cbo As ComboBox)
If cbo.ListIndex = -1 Then Exit Sub
lblShow.Caption = cbo.Value ***************
End Sub


*****this is highlighted area.
When I choose from a combo box in a form i have, I would liek to choose and
id and in a label it show the name for the id. The cbo works fine if I only
have 1 bound column but i need it to have 2 in order to show the correct name
in the label. THis is when I run into this error. Thank you so much, Jennifer
 
M

mangesh_yadav

for column 1
cbo.List(cbo.ListIndex, 1)

for column 2
cbo.List(cbo.ListIndex, 2)

Mangesh
 
G

Guest

Sorry, i guess i need more help than that. Were do i put that? Thank you for
all your help.
 
M

mangesh_yadav

I guess this is what you need.

lblShow.Caption = cbo.List(cbo.ListIndex, 1) & " "
cbo.List(cbo.ListIndex, 2)

Manges
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top