Using combo box to select check box in frame

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box that has a list of names, when one of the names is
selected this results in the closed check box in a frame to be selected
otherwise the open check box is selected.

I have this working except that if a name is selected by accident and it is
removed the closed check box is still selected.

Please see simple code below

Private Sub Combo256_Click()

If Combo256 = "" Then
Frame130 = 1

Else
Frame130 = 2

End If

End Sub
 
Try checking for NULL values instead of zero-length strings . I usually use
the following

If Len(me.Combo256 & "") = 0 Then

else

End if

You can do that or you can try

If IsNull(Me.Combo256) = True then

Else

End If

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
It now works. Appreciate your help

John Spencer said:
Try checking for NULL values instead of zero-length strings . I usually use
the following

If Len(me.Combo256 & "") = 0 Then

else

End if

You can do that or you can try

If IsNull(Me.Combo256) = True then

Else

End If

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top