<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1126" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=937501514-06032003><FONT face=Arial color=#0000ff size=2>I
don't see anything in my documentation on the IsNull funtion in Access 97 or
Access 2000 that suggests that a query name can be used as
you do in both of your examples. My first attempt would be
to say:</FONT></SPAN></DIV>
<DIV><SPAN class=937501514-06032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937501514-06032003><FONT face=Arial color=#0000ff
size=2>Function NoEval()</FONT></SPAN></DIV>
<DIV><SPAN class=937501514-06032003><FONT face=Arial color=#0000ff
size=2> If DCount("*","qry_EvaluatorNull") > 0
Then 'gives the number of records returned by the
query</FONT></SPAN></DIV>
<DIV><SPAN class=937501514-06032003> <FONT
face=Arial size=2> DoCmd.OpenForm "frm_RCSE", acNormal,
"qry_EvaluatorNull", , acFormEdit, acWindowNormal<BR>
Else<BR> MsgBox "All RCSEs have been
assigned to an
Evaluator" <BR>
End If<BR>End Function</FONT> </SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-admin@databaseadvisors.com
[mailto:accessd-admin@databaseadvisors.com]<B>On Behalf Of
</B>Hollis,Virginia<BR><B>Sent:</B> Thursday, March 06, 2003 8:34
AM<BR><B>To:</B> 'accessd@databaseadvisors.com'<BR><B>Subject:</B> [AccessD]
Help with function<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=540152513-06032003>I am trying to
write a function that will open a form with a filter. I can't seem to get it
in the correct order. I tried it two different ways as shown below. If the
evaluator has been assigned, I do not want the form to open, the message "All
assigned" should show.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=540152513-06032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=540152513-06032003>In the first try,
the message does not show at all. The second try, the message works, but the
form still opens, so I added the last line of DoCmd.Close acform, "frm_RCSE".
The form shows then closes. I would like the form not to even show. I
tried adding an On Error Resume Next, but that did not work either, the form
still opened & then closed.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=540152513-06032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=540152513-06032003>Virginia</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=540152513-06032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=540152513-06032003>*******One
Way**********</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=540152513-06032003>Function
NoEval()<BR> If Not IsNull("qry_EvaluatorNull.evaluatorID")
Then<BR> DoCmd.OpenForm "frm_RCSE",
acNormal, "qry_EvaluatorNull", , acFormEdit,
acWindowNormal<BR>
Else<BR> MsgBox "All RCSEs have been
assigned to an Evaluator"<BR>
DoCmd.Close acForm, "frm_RCSE"<BR> End If<BR>End
Function</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=540152513-06032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=540152513-06032003>**********Second
try*********</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=540152513-06032003>Function
NoEval()<BR> DoCmd.OpenForm
"frm_RCSE", acNormal, "qry_EvaluatorNull", , acFormEdit,
acWindowNormal</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=540152513-06032003>
If Not IsNull("qry_EvaluatorNull.evaluatorID")
Then<BR> MsgBox "All RCSEs have been
assigned to an Evaluator"<BR>
DoCmd.Close acForm, "frm_RCSE"<BR> End If<BR>End
Function</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=540152513-06032003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=540152513-06032003></SPAN></FONT> </DIV></BLOCKQUOTE></BODY></HTML>