Hi
I have these lines of code
Set rstRs = dbsNorthwind.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
While rstRs.EOF = False
If rstRs![assigned apm] Is Nothing Then
APMName = ""
Else
APMName = rstRs![assigned apm]
End If
But the IF statement does not work, it does not catch the
use case where the ![assigned apm] is null
The VBA halts on line
"APMName = rstRs![assigned apm]"
and report
"Invalid use of Null"
How should the IF statement be formulated in order to catch the NULL ?
or is it another way of handling the case where the result is NULL ?
Regards
I have these lines of code
Set rstRs = dbsNorthwind.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
While rstRs.EOF = False
If rstRs![assigned apm] Is Nothing Then
APMName = ""
Else
APMName = rstRs![assigned apm]
End If
But the IF statement does not work, it does not catch the
use case where the ![assigned apm] is null
The VBA halts on line
"APMName = rstRs![assigned apm]"
and report
"Invalid use of Null"
How should the IF statement be formulated in order to catch the NULL ?
or is it another way of handling the case where the result is NULL ?
Regards