Great Plains (GP 2010) AP Module - Distributions

Our AP staff would like for the "Distributions" window to open in "expanded mode."  Right now, they are manually expanding the screen. There is VBA code out there somewhere for this.  I have attached what the screen looks like in "expanded mode."
Q--Users-PMS-AP-Distribution.png
pstreAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve EndowMicrosoft MVP - Dynamics GPCommented:
Hi,

First, add your Payables Trx Entry Dist window to VBA, which it looks like you've already done.

Next, add the "expand" button to VBA.

Open the VBA Editor (CTRL+F11)

Double click on the "PayablesTransactionEntryDis" window

In the left combo box (object) in the top of the editor select Window

In the right combo box (event) in the top of the editor window, select AfterOpen

Make your AfterOpen event code look like this:

Private Sub Window_AfterOpen()
    ScrollingWindowExpandButton.Value = 1
End Sub

Open in new window


Save the VBA, close VBA editor, and then try entering a new voucher and clicking on the Distribution button.

Let me know if that works.  It works for me on GP 2013.

Thanks,

Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
pstreAuthor Commented:
Steve, the steps are very basic here. Could you elaborate more since I haven't done this before.  For example, Tools/Customize/ Add Current window, etc.

Thanks..
Steve EndowMicrosoft MVP - Dynamics GPCommented:
Please try these steps:

1. Open the Payables Transaction Entry window and pull up an existing voucher (or enter a test transaction that you can delete later)
2. Click on the Distributions button to open the Payables Trx Entry Distribution window
3. Click on Tools -> Customize -> Add current window to VB
4. Click on Tools -> Customize -> Add Fields to VB
5. When the small cross-hair mouse pointer appears, click on the "Expand Button" in the upper left corner of the grid (the one you would normally click to expand the distributions)
6. Press the Esc key to exit the Add Field mode
7. Press ALT+F11 to open the VBA Editor  (I incorrectly said CTRL previously)
8. In the Microsoft Dynamics GP Objects folder on the left side of the VBA editor window, double click on the "PayablesTransactionEntryDis" window
9. At the top of the main code editor window, in the left combo box (object) select "Window"
10. In the right combo box (event) in the top of the editor window, select "AfterOpen"
11.  The Window_AfterOpen event code will be displayed in the code window.
12. Insert the line:    ScrollingWindowExpandButton.Value = 1
13. Click Save and close the VBA editor
14. Close the Payables Transaction windows, then open an AP transaction and click on Distributions

See the attached screen shot of the VBA editor window.

Let me know if that helps and if you have any questions.

Thanks,

Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
VBAeditor.jpg

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

pstreAuthor Commented:
Steve, this was awesome.  thanks so much!  It worked and I will have happy AP clerks
Steve EndowMicrosoft MVP - Dynamics GPCommented:
Cool, glad it worked for you!  Sometimes it's the little things that make a big difference for end users who have to use GP all day.

Thanks,

Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
pstreAuthor Commented:
Yes, the little things mean alot!!  Thanks so much for your help!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Dynamics

From novice to tech pro — start learning today.