Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

VBA: Detecting grid item selection

Posted on by 225

Hi:

I'm new to GP developement and a little rusty with VBA. I wish to add a lookup button to an existing GP Window which would display the existing (standard) Divisions Window. Once the user makes a selection (Code field), the selected value is assigned to the linked field.

I found this great blog post by Mariano Gomez which explains the process very well. Though I opted not to use pass-through Dexterity and stuck with straight VBA (wasn't really sure how to figure out the right Dexterity call), I got things working.

My problem is around the Select button handler...sort of. Though it works fine, it doesn't handle the user interacting with the grid directly and simply double-clicking the desired item or navigating with the arrow keys and hitting enter to make the selection.

Looking at the DivisionsDetail grid VBA event handlers available, there doesn't appear to be anything suitable for the task. 

Many thanks!

Pab

*This post is locked for comments

  • Suggested answer
    Pablito Profile Picture
    Pablito 225 on at
    RE: VBA: Detecting grid item selection

    I thought I'd follow up for the archive should anyone come across this later.

    I didn't manage to find a way to capture the double-click or navigate-enter events so I opted to implement my own custom VBA form listing out the available Divisions in a listbox for the user to pick. This was the only way I could find to give me the control I wanted to avoid the user falling through a crack.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans