I'm trying to check data for Null or Empty.
tried to use the IsEmpty function but it return True for Null values
so I made my oun function:
normaly this code works OK.
but I noticed that it might bring back an error:
2427 - you entered an expression that has no value
this error pop for the If Trim(strTextToTest) = "" Then
which mean it's not null.
how can I send a data with no value ?
tried to use the IsEmpty function but it return True for Null values

so I made my oun function:
Code:
Function NullOrEmpty(strTextToTest As Variant) As Boolean
If IsNull(strTextToTest) Then
NullOrEmpty = True
Exit Function
End If
If Trim(strTextToTest) = "" Then
NullOrEmpty = True
Exit Function
End If
NullOrEmpty = False
End Function
but I noticed that it might bring back an error:
2427 - you entered an expression that has no value
this error pop for the If Trim(strTextToTest) = "" Then
which mean it's not null.
how can I send a data with no value ?