kgcrowther
Registered User.
- Local time
- Today, 22:32
- Joined
- Jun 1, 2001
- Messages
- 52
I would like to check if a recordset is null. The following simple code makes sense to me, but doesn't work (note the if statement, the rest is just context):
SQL = "SELECT blah blah..."
Set rsMembership = db.OpenRecordset(SQL)
If rsMembership Then
some operations ...
End If
The SQL statement should return either one tuple or nothing. I've stepped through and the SQL works fine. However, what is the syntax for checking the "nullity" of the recordset in the conditional statement?
I've also tried...
If rsMembership notnull then ...
If rsMembership not null then ...
If rsMembership <> null then ...
It seems so simple, but I can't find the right words to look up the correct syntax in any search engines. In the past I have worked around this with:
If rsMembership.recordcount > 0 then ...
But, I would like to know how to ask if it is null. Thanks for any help.
SQL = "SELECT blah blah..."
Set rsMembership = db.OpenRecordset(SQL)
If rsMembership Then
some operations ...
End If
The SQL statement should return either one tuple or nothing. I've stepped through and the SQL works fine. However, what is the syntax for checking the "nullity" of the recordset in the conditional statement?
I've also tried...
If rsMembership notnull then ...
If rsMembership not null then ...
If rsMembership <> null then ...
It seems so simple, but I can't find the right words to look up the correct syntax in any search engines. In the past I have worked around this with:
If rsMembership.recordcount > 0 then ...
But, I would like to know how to ask if it is null. Thanks for any help.