Closer Blank Title 77998

Anywhere my code says EdvOrderDtl or EdvPart, you likely created data views with slightly different naming conventions & you have to do a search replace of your epidataview names for my example names.

It should then run clean.

Can you just copy your whole module code and email it to me (either as a notepad attachment with code pasted in - or paste right into the email & I'll work thru the yahoo mail line breaks.)?

Glad to help.

Rob




________________________________
From: gmack110256 <genemack@...>
To: vantage@yahoogroups.com
Sent: Tuesday, May 19, 2009 1:30:05 PM
Subject: [Vantage] Re: Closer





Rob,
Thank you again for helping me on this, I am very new at this programming stuff.

Here is the Code I put in and it is giving me some errors:

Any idea why it is doing this?

Thank You
Gene

Private Sub OrderDtl_AfterField Change(ByVal sender As object, ByVal args As DataColumnChangeEve ntArgs) Handles OrderDtl_Column. ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldNam e]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Dim edv As EpiDataView = CType(oTrans. EpiDataViews( "OrderDtl" ), EpiDataView)

Select Case args.Column. ColumnName
Case "OrderQty"
EdvOrderDtl. dataview( edvOrderDtl. Row)("Number01" ) = EdvOrderDtl. dataview( edvOrderDtl. Row)("OrderQty" ) * EdvPart.dataview( edvPart.Row) ("NetWeight" )
otrans.update( )
otrans.refresh( )
Case Else


End Select

Compiling Custom Code ...

----------errors- --------- --

Error: BC30451 - line 73 (306) - Name 'EdvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'EdvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'EdvPart' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvPart' is not declared.

** Compile Failed. **

--- In vantage@yahoogroups .com, Robert Brown <robertb_versa@ ...> wrote:
>
> Gene,
>
> It's quite simple. Insert a statement like this inside your event triggered subroutine (in place of the statment you are trying to use to update the displayed numeric control value). I don't have your origianl email with your dataview naming conventions so adjust to suit how you have named your dataviews in the module:
>
> 'This is all one line of code. Enter as such and don't be fooled by Yahoo Mail word wrap.
> EdvOrderDtl. dataview( edvOrderDtl. Row)("Number01" ) = EdvOrderDtl. dataview( edvOrderDtl. Row)("OrderQty" ) * EdvPart.dataview( edvPart.Row) ("NetWeight" )
> 'now force an update of the true table data from the temp table data you have just changed
> otrans.update( )
> 'link your nedNumeric2 control to table OrderDtl field/column Number01. This next line will refresh the entire sheet.
> otrans.refresh( )
>
> Give that a try. The key to customization is to pick good event triggers for your subroutines. In a GUI interface, users can pretty much enter data in any field order they wish so you sometimes need more than one event trigger to cover all the bases.
>
> Also, if you are shaky on .Net coding, this is an excellent resource: http://msdn2. microsoft. com/en-us/ library/sh9ywfdk(vs.71).aspx
>
> Rob
>
>
>
>
> ____________ _________ _________ __
> From: gmack110256 <genemack@.. .>
> To: vantage@yahoogroups .com
> Sent: Tuesday, May 19, 2009 7:26:18 AM
> Subject: [Vantage] Closer
>
>
>
>
>
> Thanks Rob. I did set this up just like you stated. I used the foreign key view to pull in the "NetWeight" from Part to populate a numeric control I placed on the Sales Order Form.
>
> I am don't have any experience in setting up a OrderDtl.Number# # ud field, but thank you for steering me in that direction. I will see what information I can find to look at doing that.
>
> Thank You for your Help
>
> Gene Mack
> Johnson Systems
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>







[Non-text portions of this message have been removed]
Thanks Reggie, that gets me one step closer. This is what I have in there now,

Private Sub OrderDtl_AfterFieldChange(ByVal sender As object, ByVal args As DataColumnChangeEventArgs) Handles OrderDtl_Column.ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldName]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Dim edv As EpiDataView = CType(oTrans.EpiDataViews("OrderDtl"), EpiDataView)

Select Case args.Column.ColumnName
Case "OrderQty"
IF args.proposedvalue > 0 THEN edv.dataView(edv.Row)("nedEpiCustom2") = ("OrderQty") * ("NetWeight")

Case Else


End Select

End Sub



End Module

Compiling Custom Code ...

** Custom Code Compiled Successfully. **

When I run Test Code it tells me that the Custom Code is working ok. The issue is that I don't get any amount to show up in the "nedEpiCustom2" box, just a zero. Any other hints out there from anyone?

Thank You

Gene
Johnson Systems
Gene -



You might want to try calculating the Total Weight using the
proposedvalue.



IF args.proposedvalue > 0 THEN edv.dataView(edv.Row)("nedEpiCustom2")
= args.proposedvalue * ("NetWeight")





HTH,

CodaBears, Inc.

Calvin Dekker



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of gmack110256
Sent: Monday, May 18, 2009 1:46 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Closer








Thanks Reggie, that gets me one step closer. This is what I have in
there now,

Private Sub OrderDtl_AfterFieldChange(ByVal sender As object, ByVal args
As DataColumnChangeEventArgs) Handles OrderDtl_Column.ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldName]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Dim edv As EpiDataView = CType(oTrans.EpiDataViews("OrderDtl"),
EpiDataView)

Select Case args.Column.ColumnName
Case "OrderQty"
IF args.proposedvalue > 0 THEN edv.dataView(edv.Row)("nedEpiCustom2") =
("OrderQty") * ("NetWeight")

Case Else


End Select

End Sub


End Module

Compiling Custom Code ...

** Custom Code Compiled Successfully. **

When I run Test Code it tells me that the Custom Code is working ok. The
issue is that I don't get any amount to show up in the "nedEpiCustom2"
box, just a zero. Any other hints out there from anyone?

Thank You

Gene
Johnson Systems





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

Where is "NetWeight" coming from? The way your code now stands it would appear to be a field in table "OrderDtl" (which it is not).

I'm assuming you've set up a Foreign Key View (using data tools) to connect OrderDtl to Part and then set up epidataview (using the appropriate VB code) into the "Part" table earlier in your module code (NetWeight is a field in the Part table - and I also assume you've populated all your part records with non zero values or OrderQty*zero will always = zero).

I'm assuming you've brought Part into the application because you otherwise would get a compile error about NetWeight not being defined.

You are still only pushing OrderQty*NetWeight into a numeric control (to be displayed on the fly). Order Entry is a complex application and it is possible the value is only momentarily being displayed (too quickly for you even to see) before another native BO method in the app triggers a refresh and the "nedEpiCustom2" control once again displays a default zero value.

My suggestion would be to push your OrderQty*NetWeight calculated value permanently into an OrderDtl.Number## ud field (and force an otrans.update() so it is saved) - and then link your "nedEpicCustom2" numeric control to OrderDtl.Number##Â - and then perhaps force an otrans.refresh() so it is sure to display.

Rob




________________________________
From: gmack110256 <genemack@...>
To: vantage@yahoogroups.com
Sent: Monday, May 18, 2009 2:30:13 PM
Subject: [Vantage] Closer





Thanks Reggie, that gets me one step closer. This is what I have in there now,

Private Sub OrderDtl_AfterField Change(ByVal sender As object, ByVal args As DataColumnChangeEve ntArgs) Handles OrderDtl_Column. ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldNam e]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Dim edv As EpiDataView = CType(oTrans. EpiDataViews( "OrderDtl" ), EpiDataView)

Select Case args.Column. ColumnName
Case "OrderQty"
IF args.proposedvalue > 0 THEN edv.dataView( edv.Row)( "nedEpiCustom2" ) = ("OrderQty") * ("NetWeight" )

Case Else


End Select

End Sub


End Module

Compiling Custom Code ...

** Custom Code Compiled Successfully. **

When I run Test Code it tells me that the Custom Code is working ok. The issue is that I don't get any amount to show up in the "nedEpiCustom2" box, just a zero. Any other hints out there from anyone?

Thank You

Gene
Johnson Systems







[Non-text portions of this message have been removed]
Thanks Rob. I did set this up just like you stated. I used the foreign key view to pull in the "NetWeight" from Part to populate a numeric control I placed on the Sales Order Form.

I am don't have any experience in setting up a OrderDtl.Number## ud field, but thank you for steering me in that direction. I will see what information I can find to look at doing that.

Thank You for your Help

Gene Mack
Johnson Systems
Gene,

It's quite simple. Insert a statement like this inside your event triggered subroutine (in place of the statment you are trying to use to update the displayed numeric control value). I don't have your origianl email with your dataview naming conventions so adjust to suit how you have named your dataviews in the module:

'This is all one line of code. Enter as such and don't be fooled by Yahoo Mail word wrap.
EdvOrderDtl.dataview(edvOrderDtl.Row)("Number01") = EdvOrderDtl.dataview(edvOrderDtl.Row)("OrderQty") * EdvPart.dataview(edvPart.Row)("NetWeight")
'now force an update of the true table data from the temp table data you have just changed
otrans.update()
'link your nedNumeric2 control to table OrderDtl field/column Number01. This next line will refresh the entire sheet.
otrans.refresh()

Give that a try. The key to customization is to pick good event triggers for your subroutines. In a GUI interface, users can pretty much enter data in any field order they wish so you sometimes need more than one event trigger to cover all the bases.

Also, if you are shaky on .Net coding, this is an excellent resource: http://msdn2.microsoft.com/en-us/library/sh9ywfdk(vs.71).aspx

Rob




________________________________
From: gmack110256 <genemack@...>
To: vantage@yahoogroups.com
Sent: Tuesday, May 19, 2009 7:26:18 AM
Subject: [Vantage] Closer





Thanks Rob. I did set this up just like you stated. I used the foreign key view to pull in the "NetWeight" from Part to populate a numeric control I placed on the Sales Order Form.

I am don't have any experience in setting up a OrderDtl.Number# # ud field, but thank you for steering me in that direction. I will see what information I can find to look at doing that.

Thank You for your Help

Gene Mack
Johnson Systems







[Non-text portions of this message have been removed]
Rob,
Thank you again for helping me on this, I am very new at this programming stuff.

Here is the Code I put in and it is giving me some errors:

Any idea why it is doing this?

Thank You
Gene

Private Sub OrderDtl_AfterFieldChange(ByVal sender As object, ByVal args As DataColumnChangeEventArgs) Handles OrderDtl_Column.ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldName]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Dim edv As EpiDataView = CType(oTrans.EpiDataViews("OrderDtl"), EpiDataView)

Select Case args.Column.ColumnName
Case "OrderQty"
EdvOrderDtl.dataview(edvOrderDtl.Row)("Number01") = EdvOrderDtl.dataview(edvOrderDtl.Row)("OrderQty") * EdvPart.dataview(edvPart.Row)("NetWeight")
otrans.update()
otrans.refresh()
Case Else


End Select


Compiling Custom Code ...


----------errors------------

Error: BC30451 - line 73 (306) - Name 'EdvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'EdvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'EdvPart' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvPart' is not declared.

** Compile Failed. **



--- In vantage@yahoogroups.com, Robert Brown <robertb_versa@...> wrote:
>
> Gene,
>
> It's quite simple. Insert a statement like this inside your event triggered subroutine (in place of the statment you are trying to use to update the displayed numeric control value). I don't have your origianl email with your dataview naming conventions so adjust to suit how you have named your dataviews in the module:
>
> 'This is all one line of code. Enter as such and don't be fooled by Yahoo Mail word wrap.
> EdvOrderDtl.dataview(edvOrderDtl.Row)("Number01") = EdvOrderDtl.dataview(edvOrderDtl.Row)("OrderQty") * EdvPart.dataview(edvPart.Row)("NetWeight")
> 'now force an update of the true table data from the temp table data you have just changed
> otrans.update()
> 'link your nedNumeric2 control to table OrderDtl field/column Number01. This next line will refresh the entire sheet.
> otrans.refresh()
>
> Give that a try. The key to customization is to pick good event triggers for your subroutines. In a GUI interface, users can pretty much enter data in any field order they wish so you sometimes need more than one event trigger to cover all the bases.
>
> Also, if you are shaky on .Net coding, this is an excellent resource: http://msdn2.microsoft.com/en-us/library/sh9ywfdk(vs.71).aspx
>
> Rob
>
>
>
>
> ________________________________
> From: gmack110256 <genemack@...>
> To: vantage@yahoogroups.com
> Sent: Tuesday, May 19, 2009 7:26:18 AM
> Subject: [Vantage] Closer
>
>
>
>
>
> Thanks Rob. I did set this up just like you stated. I used the foreign key view to pull in the "NetWeight" from Part to populate a numeric control I placed on the Sales Order Form.
>
> I am don't have any experience in setting up a OrderDtl.Number# # ud field, but thank you for steering me in that direction. I will see what information I can find to look at doing that.
>
> Thank You for your Help
>
> Gene Mack
> Johnson Systems
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
You declared edv but then tried to assign it to EdvOrderDtl

Either you need to declare Edvorderdtl or change it to Edv.dataview



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of gmack110256
Sent: Tuesday, May 19, 2009 12:30 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Closer








Rob,
Thank you again for helping me on this, I am very new at this
programming stuff.

Here is the Code I put in and it is giving me some errors:

Any idea why it is doing this?

Thank You
Gene

Private Sub OrderDtl_AfterFieldChange(ByVal sender As object, ByVal args
As DataColumnChangeEventArgs) Handles OrderDtl_Column.ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldName]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Dim edv As EpiDataView = CType(oTrans.EpiDataViews("OrderDtl"),
EpiDataView)

Select Case args.Column.ColumnName
Case "OrderQty"
EdvOrderDtl.dataview(edvOrderDtl.Row)("Number01") =
EdvOrderDtl.dataview(edvOrderDtl.Row)("OrderQty") *
EdvPart.dataview(edvPart.Row)("NetWeight")
otrans.update()
otrans.refresh()
Case Else


End Select

Compiling Custom Code ...

----------errors------------

Error: BC30451 - line 73 (306) - Name 'EdvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'EdvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvOrderDtl' is not declared.
Error: BC30451 - line 73 (306) - Name 'EdvPart' is not declared.
Error: BC30451 - line 73 (306) - Name 'edvPart' is not declared.

** Compile Failed. **

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
Robert Brown <robertb_versa@...> wrote:
>
> Gene,
>
> It's quite simple. Insert a statement like this inside your event
triggered subroutine (in place of the statment you are trying to use to
update the displayed numeric control value). I don't have your origianl
email with your dataview naming conventions so adjust to suit how you
have named your dataviews in the module:
>
> 'This is all one line of code. Enter as such and don't be fooled by
Yahoo Mail word wrap.
> EdvOrderDtl.dataview(edvOrderDtl.Row)("Number01") =
EdvOrderDtl.dataview(edvOrderDtl.Row)("OrderQty") *
EdvPart.dataview(edvPart.Row)("NetWeight")
> 'now force an update of the true table data from the temp table data
you have just changed
> otrans.update()
> 'link your nedNumeric2 control to table OrderDtl field/column
Number01. This next line will refresh the entire sheet.
> otrans.refresh()
>
> Give that a try. The key to customization is to pick good event
triggers for your subroutines. In a GUI interface, users can pretty much
enter data in any field order they wish so you sometimes need more than
one event trigger to cover all the bases.
>
> Also, if you are shaky on .Net coding, this is an excellent resource:
http://msdn2.microsoft.com/en-us/library/sh9ywfdk(vs.71).aspx
>
> Rob
>
>
>
>
> ________________________________
> From: gmack110256 <genemack@...>
> To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> Sent: Tuesday, May 19, 2009 7:26:18 AM
> Subject: [Vantage] Closer
>
>
>
>
>
> Thanks Rob. I did set this up just like you stated. I used the foreign
key view to pull in the "NetWeight" from Part to populate a numeric
control I placed on the Sales Order Form.
>
> I am don't have any experience in setting up a OrderDtl.Number# # ud
field, but thank you for steering me in that direction. I will see what
information I can find to look at doing that.
>
> Thank You for your Help
>
> Gene Mack
> Johnson Systems
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





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