Freakish null in checkbox issue

  • Thread starter Thread starter Jayyde
  • Start date Start date
J

Jayyde

I have a series of checkboxes that are coming in as null. When I try
to assign them to an integer variable I get a misuse of Null error, so
I put in an if/else to check for = Null. For some reason it's not
catching it, even though when I debug and check the immediate it says
it's = to null... So basically it looks like VBA knows that the
checkbox's value is null, but doesn't want to be nice and admit it so I
can handle it in code.
 
If you're saying that you've got a check like:

If Me.MyCheckBox = Null Then

the problem is that you cannot use the = sign to check for Null.

Use

If IsNull(Me.MyCheckBox) Then

instead.
 
Back
Top