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. **
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]