You're welcome.
--
Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX
"Grace" <(E-Mail Removed)> wrote in message
news:9b4401c3eb5c$b3294210$(E-Mail Removed)...
> That worked GREAT!! Thanks so much.
>
> Grace
> >-----Original Message-----
> >Hello Grace,
> >
> >I believe the problem in the following line:
> >
> > ElseIf [CallStatus] <> "Closed" And IsNotNull
> ([Closedby]) Then
> >
> >is that there is not a function named IsNotNull().
> >
> >How about trying the following:
> >
> > ElseIf [CallStatus] <> "Closed" and Not IsNull
> ([Closedby]) then
> >
> >
> >hth and let us know...
> >--
> >
> >Cheryl Fischer, MVP Microsoft Access
> >Law/Sys Associates, Houston, TX
> >
> >
> >"Grace" <(E-Mail Removed)> wrote in
> message
> >news:a3be01c3eb3d$4a5e43d0$(E-Mail Removed)...
> >> Ok, thanks for the syntax information. Now I am having
> >> another problem, I would like the code to check 2
> things.
> >> The first part of the code (where [CallStatus]="closed")
> >> works great, but I would also like it to check if the
> >> Closedby field is NOT null and the [CallStatus] field is
> >> not equal to "Closed" then bring up an error message. I
> >> am getting a compile error on the ElseIf. I assume I am
> >> not writing this correctly. (Can you tell my VBA
> >> knowledge is lacking??!!)
> >>
> >> If [CallStatus] = "Closed" And IsNull([Closedby]) Then
> >> MsgBox "You must enter the Closed By information.",
> >> vbOKOnly
> >> [Closedby].SetFocus
> >> Cancel = True
> >>
> >> ElseIf [CallStatus] <> "Closed" And IsNotNull
> >> ([Closedby]) Then
> >> MsgBox "You must change the Call Status to
> >> Closed.", vbOKOnly
> >> [CallStatus].SetFocus
> >> Cancel = True
> >> End If
> >>
> >> End If
> >>
> >>
> >> Thank you,
> >> Grace
> >> >-----Original Message-----
> >> >
> >> >>-----Original Message-----
> >> >>In the code below, I would like the msg box to appear
> if
> >> >>the [CallStatus] field is not equal to "Closed". I
> just
> >> >>don't know the syntax for "not equal to"!
> >> >>
> >> >>If [CallStatus] not equal to "Closed" And IsNotNull
> >> >>([Closedby]) Then
> >> >> MsgBox "You must change the Call Status to
> Closed.",
> >> >>vbOKOnly
> >> >> [CallStatus].SetFocus
> >> >> Cancel = True
> >> >>End If
> >> >>
> >> >>Thanks for your help
> >> >>.
> >> >>I would use "<>".
> >> >.
> >> >
> >
> >
> >.
> >
|