Customization problem on Invoice Entry

It is a little suspicious to me that you are setting up CustomerAdapt via a DIM statement(and corresponding BO()Connect statement) within the Sub itself.

I don't know if this was hand coded this way by you or if you used a Wizard to generate much of the code.

If a Wizard, be aware that they sometimes goof (and it happens more frequently when you have a mix of Wizard generated Subs and some necessarily hand coded Functions set up).

In this case, you might want to try defining Customer Adapt outside of the Sub (then also available for the entire module) by starting off with:

Private WithEvents oTrans_customerAdapter As EpiBaseAdapter

then in the Sub InitializeCustomCode() section initialize it with:

oTrans_customerAdapter = csm.TransAdaptersHT("oTrans_customerAdapter")

Finally (for good practices housekeeping) don't forget with the Sub DestroyCustomCode() section:

oTrans_customerAdapter = Nothing

It is a remote possibility that you may find your variable DIM statements also need to be set at the Module level (and not just within your Sub).

Worth a try?

(Good luck.)

Rob Brown

dyoderbx <dyoder@...> wrote:
I am new at this on Vantage 803.403C.

This is my first attempt at a Form Event Wizard. I am trying to get
the Customer GroupCode field saved into the InvoiceDtl user field
ShortCar01. I am expecting Company, CustNum & ShortChar01 to be
available from the form I am customizing.

I am getting a errors CustomerAdapter not found and Company, CustNum
and ShortChar01 not defined. What am I doing wrong? Here is my
code.

Private Sub InvcDtl_AfterFieldChange(ByVal sender As object, ByVal
args As DataColumnChangeEventArgs) Handles
InvcDtl_Column.ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldName]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Select Case args.Column.ColumnName

Case "ExtPrice"

Dim CustomerAdapt As CustomerAdapter = New CustomerAdapter
(ARInvoiceForm)
CustomerAdapt.BOConnect()
Dim KCompany As String = Company.ToString()
Dim KCustNum As Integer = CustNum.ToInteger()
Dim Flag As Boolean = CustomerAdapt.GetByID(KCompany, KCustNum)

If Flag Then
ShortChar01 = CustomerAdapt.CustomerData.Tables("Customer").Rows(0)
("GroupCode")
CustomerAdapt.dispose()
End if

Case Else

End Select

End Sub

Any clarification would be appreciated.

Denton Yoder
Bil-Jax, Inc.






---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.

[Non-text portions of this message have been removed]
I am new at this on Vantage 803.403C.

This is my first attempt at a Form Event Wizard. I am trying to get
the Customer GroupCode field saved into the InvoiceDtl user field
ShortCar01. I am expecting Company, CustNum & ShortChar01 to be
available from the form I am customizing.

I am getting a errors CustomerAdapter not found and Company, CustNum
and ShortChar01 not defined. What am I doing wrong? Here is my
code.

Private Sub InvcDtl_AfterFieldChange(ByVal sender As object, ByVal
args As DataColumnChangeEventArgs) Handles
InvcDtl_Column.ColumnChanged
'// ** Argument Properties and Uses **
'// args.Row("[FieldName]")
'// args.Column, args.ProposedValue, args.Row
'
'Add Event Handler Code
'
Select Case args.Column.ColumnName


Case "ExtPrice"

Dim CustomerAdapt As CustomerAdapter = New CustomerAdapter
(ARInvoiceForm)
CustomerAdapt.BOConnect()
Dim KCompany As String = Company.ToString()
Dim KCustNum As Integer = CustNum.ToInteger()
Dim Flag As Boolean = CustomerAdapt.GetByID(KCompany, KCustNum)

If Flag Then
ShortChar01 = CustomerAdapt.CustomerData.Tables("Customer").Rows(0)
("GroupCode")
CustomerAdapt.dispose()
End if

Case Else

End Select

End Sub


Any clarification would be appreciated.

Denton Yoder
Bil-Jax, Inc.