Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accpac On Change function

Status
Not open for further replies.

irenavassilia

Programmer
Jun 19, 2007
101
Hi Everyone,

I need to pre-populate the first manufacturing item number from Accpac ERP v5.4 P/O.

This is my code i'm just curious as to why this function never gets triggered? Could someone please help me understand this.

Here is my code:

Private WithEvents dsOEORDD As AccpacOE1100.ACCPACDSControl
Private Sub AccpacOE1100UICtrl1_OnUIAppClosed()
Set dsOEORDD = Nothing
End
End Sub

Private Sub AccpacOE1100UICtrl1_OnUIAppOpened()
Dim strCompName As String

Set dsOEORDD = AccpacOE1100UICtrl1.UIDSControls(13)

strCompName = AccpacOE1100UICtrl1.UISession.CompanyID
Me.Caption = strCompName & " - " & pstrProjectTitle

End Sub

Private Sub dsOEORDD_OnRecordChanging(ByVal eReason As tagEventReason, pStatus As tagEventStatus, ByVal pField As AccpacDataSrc.IAccpacDSField, ByVal pMultipleFields As AccpacDataSrc.IAccpacDSFields)

If (eReason = RSN_ADDNEW) Then
'Read the first ICIOTH record
OEORDD.MANITEMNO = ICIOTH.MANITEMNO
End If

Exit Sub

End Sub
 
AccpacOE1100UICtrl1.UIDSControls(13) may not be correct, try another one. Also, you should use the name, not the index number, for when the control is changed by Sage.
 
Hi Tuba,

Ok I'll try using a different UID control.

I'm not sure what you mean by using the name instead of the index number though.

Thanks.

Regards,

Irena
 
When you run AccpacUIInfo, you see both a name and an index number for the controls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top