web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

VBA: Detecting grid item selection

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    Pablito Profile Picture
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans