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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accpac macro

Status
Not open for further replies.

wysiwygger

Programmer
Jun 20, 2006
78
AU
Hi,

I've just started with macros in Accpac and struggle with my first easy task.
For the beginning I would like to open view AR0032 with the push on a button out of a module.

Is there a way I can add additional buttons on existing Accpac forms? how do I open this view?
Please help!
 
Start by recording a macro while you perform the functions you want the macro to do. This will give you a bunch of VBA code you need to clean up. This macro will show you how to declare the objects and how to open a view.
You can add the Accpac screens to a VB or VBA form, and then add your own buttons on the VB or VBA form.
 
hi,

Thanks for your reply!

I tried this but I can't record a macro for this module.
It's a third party module.
Macro recording for typical Accpac modules is working fine...
 
AR0032 is for AR...
Which module is it?
You can use the same logic for any module (more or less), just change the views that are opened.
 
Information Manager.
I try to get data from AR into IM.
In the end I want to have something like a magnifying glass where I open AR0032 - and select a value which is written in a field in IM.

But right now I'm still struggling with the basics - opening the view with the click on a button.....
 
Never heard of Information Manager.

OK, the starting point is to record a macro.
AR0032 is the invoice batch header, so I assume you want to pull some invoice information.

Start with small steps.
Start recording a macro, open AR Customers, close AR customers, stop recording.

You should now get a VBA screen with some code.

Create a new VBA form, add a button to the form, then add the generated code to the button. This will open AR customers when you click the button, but you can change the view - the same principal applies.
So now you have a form with a button with some code.
Next is to create a new form with the required Accpac form on it and add your button to the form.
 
AR0032 is A/R Invoice Batch Headers. I think you're confused between database views and UI screens. If you want a button to select an invoice batch number, you would use a Field Edit control.

Jay Converse
IT Director
Systemlink, Inc.
 
You might be doing your development the wrong way around.

Have your setup AR0032 in Budget and Info Management's Budget view type.

This will be the first step to integrate the AR (A/R Invoice Batch Headers)and IM.

You can also ask your Service Provider to contact Orchid on your behalf.

They really are extremely helpful.
 
Hi,

thx for your replies!!!!

ettienne:
I tried it with AR Customers and I could record the macro. But if I run it in VB it doesn't open the window. It runs through but nothing happens. What's the command to actually show the window?
I think this should be added after this to show it:

mDBLinkCmpRW.OpenView "AR0022", ARCUSTSTAT2
Set ARCUSTSTAT2Fields = ARCUSTSTAT2.Fields

Relloc:
I set up this view type but it does not do what I want. I want to have a button on the form or something like when I go to a specific field it opens up the AR window.

Jay:
I think you are right with the field edit control. I think I read it somewhere else in the forum as well. How would I do it?

Cheers
 
Save us all some trouble. Go to Accpac University, and take the VBA course.

Jay Converse
IT Director
Systemlink, Inc.
 
Sorry my reply was a bit confusing, I was distracted at the time.
The recorded macro will not open a screen, it just opens the views.
To open an actual screen you need to place the OCX for the screen on a VBA form.
There is a lot to learn and it is difficult to condense the knowledge on a forum like this.
 
Jay,

time can't be ur issue cause u've time writing this crap.
Why replying if it's not helpful!?
 
Because it's become clear that you need training. You're asking very, very basic questions that a simple course would solve.

Can you do this?

1. Create a macro
2. Add a form
3. Add an Accpac OCX to the form
4. Add an Accpac data source control to the form
5. Add an Accpac field edit control to the form
6. Bind the OCX's data source to your data source
7. Bind your data source to the field edit control
8. Add your code to the OnRecordChanging event.

Jay Converse
IT Director
Systemlink, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top