Exception in VB to prevent invalid data entry

Thanks Jose,

Yes, a BPM is good in the update cases, but the example I used is just one among a few. I am validating data as the user enters fields and I want to catch it then, not wait for the update.

- Neil



-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Friday, 14 September 2012 9:08 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Exception in VB to prevent invalid data entry

Bpm is a more appropriate solution ford this problem.
It covers Allen the cases, pre processing on update should it On Sep 13, 2012 6:45 PM, "nbuckman@..." < nbuckman@...> wrote:

> **
>
>
>
> Hello,
>
> I have some VB code like this in a customisation. It works when an
> invalid part is first entered in the field, but if the user
> immediately re-enters the invalid code then the exception does not
> happen. How do I restart the process, so to speak, so that you can't get past it?
>
> Private Sub UD100_AfterFieldChange(ByVal sender As Object, ByVal args
> As
> DataColumnChangeEventArgs)
> ....code here....
> Select Case args.Column.ColumnName
> Case "ShortChar01"
> ....code here.....
> If PartFound = True then
> ....code here...
> Else
> MessageBox.Show(PartNum + "is not a valid part number.
> Please retry...")
> Throw new UIException()
> End If
> End Select
> End Sub
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links




Notice:This e-mail and any attachments are confidential and are only for the use of the person to whom they are addressed. If you are not the intended recipient please advise the sender by return e-mail and delete the message and any attachments. Any use, interference with, disclosure or copying of this message or any attachments is unauthorised and prohibited. The sender does not warrant that the information is free of a virus or any other defect or error, and any views expressed herein, unless specifically indicated otherwise, are those of the individual sender.

The DH Gibson Group of Companies - http://www.gibsonshopfitters.com.au

P Please consider our shared environment before printing this communication.
Hello,

I have some VB code like this in a customisation. It works when an
invalid part is first entered in the field, but if the user immediately
re-enters the invalid code then the exception does not happen. How do I
restart the process, so to speak, so that you can't get past it?

Private Sub UD100_AfterFieldChange(ByVal sender As Object, ByVal args As
DataColumnChangeEventArgs)
....code here....
Select Case args.Column.ColumnName
Case "ShortChar01"
....code here.....
If PartFound = True then
....code here...
Else
MessageBox.Show(PartNum + "is not a valid part number.
Please retry...")
Throw new UIException()
End If
End Select
End Sub



[Non-text portions of this message have been removed]
Bpm is a more appropriate solution ford this problem.
It covers Allen the cases, pre processing on update should it
On Sep 13, 2012 6:45 PM, "nbuckman@..." <
nbuckman@...> wrote:

> **
>
>
>
> Hello,
>
> I have some VB code like this in a customisation. It works when an
> invalid part is first entered in the field, but if the user immediately
> re-enters the invalid code then the exception does not happen. How do I
> restart the process, so to speak, so that you can't get past it?
>
> Private Sub UD100_AfterFieldChange(ByVal sender As Object, ByVal args As
> DataColumnChangeEventArgs)
> ....code here....
> Select Case args.Column.ColumnName
> Case "ShortChar01"
> ....code here.....
> If PartFound = True then
> ....code here...
> Else
> MessageBox.Show(PartNum + "is not a valid part number.
> Please retry...")
> Throw new UIException()
> End If
> End Select
> End Sub
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]