quick If isnull & DCount line

swarv

Registered User.
Local time
Today, 16:27
Joined
Dec 2, 2008
Messages
196
I have the following line:

Code:
If IsNull(DCount("*", "qry_checkallusersforticks")) And username1 = "Janine" Then

Can you tell me if this is likely to work?

The program does process the line but always goes staight to the Else commands.

The query it refers to is:

Code:
SELECT absent.id, absent.Name, absent.Days, absent.notes, absent.comments, absent.backtowork, absent.certification, absent.start_date, absent.end_date
FROM absent
WHERE absent.backtowork = "No" OR absent.certification = "No";

Bascially I want it to load a form if any of the records in the absent table have a 'no' against them.

Thanks
 
Try

If nz(DCount("*", "qry_checkallusersforticks"),0) = 0 And username1 = "Janine" Then


David
 
excellent, thanks. your a star
 

Users who are viewing this thread

Back
Top Bottom