Gustav Brock
gustav at cactus.dk
Thu Mar 6 07:47:00 CST 2003
Hi Virginia Don't hit me, but you can't do this: If Not IsNull("qry_EvaluatorNull.evaluatorID") Then You need to open a recordset and evaluate .RecordCount ... /gustav > 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. > 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. > Virginia > *******One Way********** > Function NoEval() > If Not IsNull("qry_EvaluatorNull.evaluatorID") Then > DoCmd.OpenForm "frm_RCSE", acNormal, "qry_EvaluatorNull", , > acFormEdit, acWindowNormal > Else > MsgBox "All RCSEs have been assigned to an Evaluator" > DoCmd.Close acForm, "frm_RCSE" > End If > End Function