Code Error

kbreiss

Registered User.
Local time
Today, 05:27
Joined
Oct 1, 2002
Messages
228
I have the following code that when the control gets focus it displays a msgbox with all the information. However if there is nothing in the combo box I get an invalid use of a null. I put the "if cbotaxes = null then exit sub", but the code always skips over the "exit sub" Does anyone see anything wrong with the code? Even when I walk through the code, cbotaxes = null, but still skips the exit sub. Thanks in advance.

Kacy

Private Sub cboTaxes_GotFocus()

If (cboTaxes) = Null Then
Exit Sub
Else
MsgBox (cboTaxes)
End If
End Sub
________
WENDIE 99
 
Last edited:
Kacy,

Code:
Private Sub cboTaxes_GotFocus()

If IsNull(cboTaxes) Then
   Exit Sub
Else
   MsgBox (cboTaxes)
End If
End Sub

Wayne
 
Thanks Wayne! Just curious what is the difference. Thanks again...got it working.

Kacy
________
Nevada marijuana dispensary
 
Last edited:

Users who are viewing this thread

Back
Top Bottom