Finding Missing data

  • Thread starter Thread starter John Nelson
  • Start date Start date
J

John Nelson

I want to report records that have missing data.
I have a form with check boxes to select which fields I
want to select for the query.
I want to make a function to be use in the criteria box of
a query that reads the CheckBox and enters Is Null.

My function is...
Function CheckCheck(CheckMark As Integer) As Variant
CheckCheck = Null
If CheckMark = -1 Then
CheckCheck = "Is Null"
End If
End Function

So in the criteria box is, for instance...
CheckCheck([Forms]![MissingDataSearchForm]![EmailAddress].
[value])

If I substitute an actual email address for "Is Null", the
function works, but it chokes on "Is Null".
Actually the "CheckCheck = Null" does not work either.
Any ideas
 
I want to report records that have missing data.
I have a form with check boxes to select which fields I
want to select for the query.
I want to make a function to be use in the criteria box of
a query that reads the CheckBox and enters Is Null.

My function is...
Function CheckCheck(CheckMark As Integer) As Variant
CheckCheck = Null
If CheckMark = -1 Then
CheckCheck = "Is Null"
End If
End Function

So in the criteria box is, for instance...
CheckCheck([Forms]![MissingDataSearchForm]![EmailAddress].
[value])

If I substitute an actual email address for "Is Null", the
function works, but it chokes on "Is Null".
Actually the "CheckCheck = Null" does not work either.
Any ideas

You can only pass actual values in a field as a parameter - not "IS
NULL" or operators such as BETWEEN, IN(), > or <, etc.

Try a criterion of

=[Forms]![MissingDataSearchForm]![EmailAddress] OR
[Forms]![MissingDataSearchForm]![EmailAddress] IS NULL
 
Back
Top