If statement based on null table contents (1 Viewer)

Z34Lee

Registered User.
Local time
Yesterday, 23:58
Joined
Dec 8, 2006
Messages
22
I'm looking to create something like this:

If [FieldName] of any of the records is equal to null Then

It would also be nice to count the instances in which those fields are equal to null to use later in the application. Any suggestions? I don't know how to cycle through a recordset like that.
 

FoFa

Registered User.
Local time
Yesterday, 22:58
Joined
Jan 29, 2003
Messages
3,672
SELECT COUNT(*)
FROM YourTableName
Where YourTableName.YourFieldName IS NULL

Basically
 

Z34Lee

Registered User.
Local time
Yesterday, 23:58
Joined
Dec 8, 2006
Messages
22
I'll try it out. Thanks!
 

Z34Lee

Registered User.
Local time
Yesterday, 23:58
Joined
Dec 8, 2006
Messages
22
The SQL statement works great, thanks for that. I'm having a hard time calling that value in my code's "if" statement though.
 

Users who are viewing this thread

Top Bottom