<!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 5.00.3314.2100" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=590144613-30012003>I have been off the
list for awhile - you sure have gotten fancy with subscribing the last few
months!!</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=590144613-30012003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=590144613-30012003>***********</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=590144613-30012003>Problem:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=590144613-30012003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=590144613-30012003>I have a form that
users select their name from a combobox, it opens a main form that allows
them to edit only active requests. I am having problems with the main form
opening even if they do not have any active requests (they are closed). If they
do not have any active requests, the message box "No Open EFRs" should display,
but it doesn't, the frmSystemFailure opens & I receive an error, can't go to
specified record (on the main form OnOpen, I have it set focus to a certain
field).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=590144613-30012003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=590144613-30012003>How can I prevent
the frmSystemFailure from opening & display the message? </SPAN></FONT><FONT
face=Arial size=2><SPAN class=590144613-30012003>UserID is the name of the
combobox.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=590144613-30012003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=590144613-30012003> 'Status is
Pending, In Progress, or In Review, and User ID = Engineer
ID<BR> stDocName = "frmSystemFailure"<BR>
stLinkCriteria = "[EngineerID]=" & Me![UserID] & " AND [StatusID] = 1"
& _<BR> "Or [EngineerID]=" & Me![UserID] & " AND
[StatusID] = 2" & _<BR> "Or [EngineerID]=" &
Me![UserID] & " AND [StatusID] =
4"<BR>
<BR> ' Check whether the user has any EFRs open. If they do,
open the<BR> ' form with a filter.<BR>On Error Resume
Next<BR> If DCount("EngineerID", "tblEngineer",
stLinkCriteria) Then<BR>
DoCmd.OpenForm stDocName, , , stLinkCriteria<BR>
Else<BR> 'Display Message "No open
EFRs"<BR> MsgBox "No open EFRs for "
& Forms![frmUpdateEFRs]![UserID].Column(1)<BR> End
If</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=590144613-30012003> '
Close the dialog box.<BR> DoCmd.Close acForm,
"frmUpdateEFRs"</SPAN></FONT></DIV></BODY></HTML>