1. Create a VBA macro in ACCPAC by using the macro editor
2. Insert a form into your macro
3. Right-click on Toolbox within the VBA Editor
4. Select to add the UI control you want to customize e.g. ACCPACPO1210UICtrl
5. Drag and drop to place the UI control on the form.
6. Select Tools->References from menu.
7. Find ACCPAC Data Source Control 1.0 and check it.
8. Add the following code to your control:
' Declare a data source control for use
Option Explicit
Dim WithEvents dsPO As ACCPACPO1210.ACCPACDSControl
Private Sub AccpacPO1210UICtrl1_OnUIAppOpened()
' set your data souce control to one of the UI data source controls
Set dsPO = AccpacPO1210UICtrl1.UIDSControls(10)
' Define where you want your UI to start by default
dsPO.Fields("PONUMBER") = "PO000000028"
End Sub
Note
----
The above logic can be applied to just about any data entry forms in ACCPAC 5.0 and up. To find out details of each form, use the UI Info tool.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.