Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Using VBA to skip fields

(1) ShareShare
ReportReport
Posted on by 75,848 Moderator

I would like to have the cursor automatically skip a few fields after the user enter a purchases amount on the Payables Transaction Entry screen. I thought this would do the trick but I get "Invalid Object"  message.

Private Sub Purchases_AfterUserChanged()

    Console.Writeline ("\t")

End Sub

What is the correct syntax to output a tab character so that it will skip a field.

*This post is locked for comments

  • Tim Foster Profile Picture
    8,515 on at
    RE: Using VBA to skip fields

    For future reference the VBA Command to Send the tab keystroke

    SendKeys Chr(9)

    or some blogs say this

    SendKeys "{TAB}"

    Tim

  • Suggested answer
    Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Using VBA to skip fields

    VBA does not have a console object but the focus code works. The users want to go directly to the check field after enter the purchases amount.  me.Check.Focus does the trick. Thanks.

  • Suggested answer
    Tim Foster Profile Picture
    8,515 on at
    RE: Using VBA to skip fields

    You could try:

    Console.Writeline (chr(9))

    Why not just set the focus on the object?

    me.somefield.focus

    Tim

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans