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

Notifications

Announcements

No record found.

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,850 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

I have the same question (0)
  • Suggested answer
    Tim Foster Profile Picture
    8,515 on at

    You could try:

    Console.Writeline (chr(9))

    Why not just set the focus on the object?

    me.somefield.focus

    Tim

  • Suggested answer
    Richard Wheeler Profile Picture
    75,850 Moderator on at

    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.

  • Tim Foster Profile Picture
    8,515 on at

    For future reference the VBA Command to Send the tab keystroke

    SendKeys Chr(9)

    or some blogs say this

    SendKeys "{TAB}"

    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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans