Add Button to Customer Inquiry

Hi all,

I'm new to Sage 300 (although I have experience with Sage 200) so please excuse what might be a basic question: how do I add a button to the Customer form? Similar to where the Save and Delete buttons are (see attached), if possible.

I've been reading Stephen Smith's Blog as well as the Programming Guide on the Sage 300 wiki, but it all seems far too complex for what I want to achieve. Sage Support have been helpful in pointing me in the direction of using VBA macro's. I can record a macro, etc., but I can't figure out how to edit and existing form using a VBA macro.

Any help is greatly appreciated.

Regards,

Brent Newbury

  • 0

    Drop the AR customer inquiry form's OCX file onto a blank VBA form.

  • 0 in reply to Ettienne Schwagele

    Hi Ettienne,

    I'm in the C:\Sage300ERP\AR62A\ folder and attempting to drag and drop any of the .ocx files into a form, but it wasn't a valid drop target. Dropping any of the .ocx files in the Project pane produced the error "'C:\Sage300ERP\AR62A\AccpadARxxxx.ocx' could not be loaded." (http://i.imgur.com/BMWCP2f.png)

    Which one should I try to open? Also, if I save that OCX file, will that override the default Customer/Customer Inquiry screen on this machine?

    Thank you very much for your help, I really appreciate it.

    Regards,

    Brent Newbury

  • 0 in reply to Brent Newbury

    Um.... yeah that's not happening.

    Click View, Details on the Sage 300 menu. Then open A/R Customers (the folder on the left, not the icon). Look at Customer Inquiry under Details it lists AR1700.

    Open VBA and add a form. Right-click the Toolbox and select Additional Controls. Scroll down and select AccpacAR1700.ACCPACAR1700UICtrl and click OK. select the new control on the Toolbox and then add it to your form (basically click and draw a rectangle on the form). You now have the OCX on your VBA form. Press F5 and the Customer Inquiry form should open.

  • 0 in reply to Ettienne Schwagele

    Hi Ettienne,

    Thank you, your response was very helpful. I don't have VBA, but I do have Visual Basic 6.0 Enterprise Edition and I managed to drag the control onto a new OCX control, adding a button. So when I save the new OCX control over the existing one, I get an error when launching the form, even if I register the OCX control using regsvr32. The error is "Can't Create Control: {xxxxxx-xxx-xxxxxx}"

    Have you come across this at all?

    Regards,

    Brent Newbury

  • 0 in reply to Brent Newbury

    If you are running Sage 300 ERP then you do have VBA. To be honest I think this is above your skill level.

  • 0 in reply to Ettienne Schwagele

    I haven't done any VB development in 12 years and I've never before touched Sage 300 nor developed any Active X controls, please excuse my lack of skill in this particular area. I came here to ask for assistance in adding a button to a form, which when using Sage 200 isn't too difficult. Additionally, the documentation in this area is severely lacking. Telling me this is above my skill level does not help anyone.

    Does anyone have any advice to offer in adding a button to a form in Sage 300?

  • 0 in reply to Brent Newbury

    Sage 300 is not open source like Sage 200 - you cannot edit the forms. You need to create your own forms.

    Do it in VBA (Macro, Edit in Sage 300) first. Follow my steps above. Get some training on writing VBA macros in Sage 300 - visit www.sageu.com

    There is a very steep learning curve, this is not something you're going to learn from a couple of posts in an end user forum. If you are a partner then go to the partner VBA forum here: sagecity.na.sage.com/.../56.aspx