The form-level Item_Send event does not have a cancel parameter. Item_Send = False is the correct way to cancel the send. I would start my troubleshooting by adding a MsgBox statement to display the value of item.userproperties("cost center")
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at
http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm
"carl lorentson" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> I believe you need something like the code below. Note the use of the
> Cancel parameter. (Source: Ms Outlook VB Ref | Events | Send Event)
>
> Function Item_Send(Cancel)
>
> If not isNumeric(item.userproperties("cost center")) then
>
> Cancel = True 'Item_Send = False
>
> msgbox "Cost Center must be numeric"
>
> End If
>
> End Function
>
> Hope that works,
> Carl Lorentson
>
> "Theresa" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Ok, so I am doing some basic form validation using VBScripts
> functions...if
> > they dont resolve I set the send function to false...can anyone tell me
> why
> > it still sends??
> > Function Item_Send()
> >
> > If not isNumeric(item.userproperties("cost center")) then
> >
> > Item_Send = False
> >
> > msgbox "Cost Center must be numeric"
> >
> > End If
> >
> > End Function
> >
> >
>
>