A little programming help

Thanks mmcwilliams22 ..... I found out what I was doing incorrectly and was able
to get your suggestion working.... Many thanks



________________________________
From: Paul L Bennett <paullbennett@...>
To: vantage@yahoogroups.com
Sent: Wed, March 23, 2011 3:40:01 PM
Subject: Re: [Vantage] Re: A little programming help


Thanks for your response on this. I have found that the approach will achieve
exactly what I am looking for however when I implement I find that the job is
still being added. I don't think that the code sees and recognizes that a job
already exist. Any ideas...

________________________________
From: mmcwilliams22 <mmcwilliams22@...>
To: vantage@yahoogroups.com
Sent: Wed, March 23, 2011 1:36:03 PM
Subject: [Vantage] Re: A little programming help

We just made the start production activity button so small you could not see it
then replaced it with another button and the following code. I guess this only
works if you are trying to lock it for the single station though.

Dim LaborDtl As EpiDataView = Ctype(oTrans.EpiDataViews("LaborDtl"),EpiDataView)
Dim intRow As Integer = LaborDtl.Row()
If intRow > -1 Then
msgbox("You can only work on one job at a time")
Else
btnStart.PerformClick()
End If

--- In vantage@yahoogroups.com, Paul L Bennett <paullbennett@...> wrote:
>
> I am writing some code to stop a user from starting another job activity if one
>
>
> is already active under their employee number. I am using the {Lib/PublishEx.i
>
>
> &ExMsg = "'Job Already started.'"} to raise the exception which works except
> that instead of the user going to the main MES screen the start production
> activity screen appears but is inaccessible. What can I do to not let this
> screen appear but instead go to the main MES screen??.
>
>
>
>
> [Non-text portions of this message have been removed]
>

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







[Non-text portions of this message have been removed]
I am writing some code to stop a user from starting another job activity if one
is already active under their employee number. I am using the {Lib/PublishEx.i
&ExMsg = "'Job Already started.'"} to raise the exception which works except
that instead of the user going to the main MES screen the start production
activity screen appears but is inaccessible. What can I do to not let this
screen appear but instead go to the main MES screen??.




[Non-text portions of this message have been removed]
We just made the start production activity button so small you could not see it then replaced it with another button and the following code. I guess this only works if you are trying to lock it for the single station though.

Dim LaborDtl As EpiDataView = Ctype(oTrans.EpiDataViews("LaborDtl"),EpiDataView)
Dim intRow As Integer = LaborDtl.Row()
If intRow > -1 Then
msgbox("You can only work on one job at a time")
Else
btnStart.PerformClick()
End If


--- In vantage@yahoogroups.com, Paul L Bennett <paullbennett@...> wrote:
>
> I am writing some code to stop a user from starting another job activity if one
> is already active under their employee number. I am using the {Lib/PublishEx.i
> &ExMsg = "'Job Already started.'"} to raise the exception which works except
> that instead of the user going to the main MES screen the start production
> activity screen appears but is inaccessible. What can I do to not let this
> screen appear but instead go to the main MES screen??.
>
>
>
>
> [Non-text portions of this message have been removed]
>
Thanks for your response on this. I have found that the approach will achieve
exactly what I am looking for however when I implement I find that the job is
still being added. I don't think that the code sees and recognizes that a job
already exist. Any ideas...



________________________________
From: mmcwilliams22 <mmcwilliams22@...>
To: vantage@yahoogroups.com
Sent: Wed, March 23, 2011 1:36:03 PM
Subject: [Vantage] Re: A little programming help



We just made the start production activity button so small you could not see it
then replaced it with another button and the following code. I guess this only
works if you are trying to lock it for the single station though.

Dim LaborDtl As EpiDataView = Ctype(oTrans.EpiDataViews("LaborDtl"),EpiDataView)
Dim intRow As Integer = LaborDtl.Row()
If intRow > -1 Then
msgbox("You can only work on one job at a time")
Else
btnStart.PerformClick()
End If

--- In vantage@yahoogroups.com, Paul L Bennett <paullbennett@...> wrote:
>
> I am writing some code to stop a user from starting another job activity if one
>
> is already active under their employee number. I am using the {Lib/PublishEx.i
>
> &ExMsg = "'Job Already started.'"} to raise the exception which works except
> that instead of the user going to the main MES screen the start production
> activity screen appears but is inaccessible. What can I do to not let this
> screen appear but instead go to the main MES screen??.
>
>
>
>
> [Non-text portions of this message have been removed]
>







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