Error 94

G

Guest

This is the error I can't seem to fix
Null value?

Private Sub ShowValue(cbo As ComboBox)
If cbo.ListIndex = -1 Then Exit Sub
lblShow.Caption = cbo.Value
 
B

Bob Phillips

Can you show all the code, how the combo is loaded etc.?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

Thanks Bob,
I figured it out though. When I changed the boundcolumns in the properties
from 1 to 2 this error happened. Once I changed it back to 1 all was good. Do
you have any idea why this happened, it didn't seem to affect the other combo
box that I switched. Just the ranch id cbo Thank you again. Jennifer

Bob Phillips said:
Can you show all the code, how the combo is loaded etc.?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
T

Tom Ogilvy

If you have a single column combobox, then designating the boundcolumn as 2
would refer to a column that doesn't exist. What would be the intent of
designating column 2 if it is single column?

Boundcolumn = 0 returns listindex as the value of the combobox
Boundcolumn = 1 returns the selected row of column 1 as the value of the
combobox
and so forth.

Why would it work on other comboboxes - you may actually have more than one
column.

--
Regards,
Tom Ogilvy


Jennifer said:
Thanks Bob,
I figured it out though. When I changed the boundcolumns in the properties
from 1 to 2 this error happened. Once I changed it back to 1 all was good. Do
you have any idea why this happened, it didn't seem to affect the other combo
box that I switched. Just the ranch id cbo Thank you again. Jennifer
 

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