<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2719.2200" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff
size=2>Virginia,</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff size=2>I presume you
still have your second method so I will suggest how to modify
it.</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff size=2>1. Open the
form with its Visible property set to False.</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff size=2>2. Change
the IF statement to </FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff size=2>IF IsNull(...)
Then</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003> <FONT color=#0000ff
size=2>MsgBox ...</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003> <FONT color=#0000ff
size=2>DoCmd.Close ...</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff
size=2>Else</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003> <FONT color=#0000ff
size=2>'set form's Visible property to True</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff size=2>End
If</FONT></SPAN></DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=687294113-06032003><FONT color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=687294113-06032003></SPAN><SPAN lang=en-us><B><FONT
color=#0000ff>Charles Wortz</FONT></B></SPAN> <BR><SPAN lang=en-us><FONT
color=#0000ff>Software Development Division</FONT></SPAN> <BR><SPAN
lang=en-us><FONT color=#0000ff>Texas Education Agency</FONT></SPAN> <BR><SPAN
lang=en-us><FONT color=#0000ff>1701 N. Congress Ave</FONT></SPAN> <BR><SPAN
lang=en-us><FONT color=#0000ff>Austin, TX 78701-1494</FONT></SPAN> <BR><SPAN
lang=en-us><FONT color=#0000ff>512-463-9493</FONT></SPAN> <BR><SPAN
lang=en-us><FONT color=#0000ff>CWortz@tea.state.tx.us</FONT></SPAN> </DIV>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Hollis,Virginia
[mailto:HollisVJ@pgdp.usec.com] <BR><B>Sent:</B> Thursday 2003 Mar 06
07:34<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></BODY></HTML>