Move the Cursor to a Control

To move the cursor to a specific control on an open form (from within a standard module), use this syntax:

Forms![formName]![controlName].SetFocus

For example, the following VBA statements open a form named NewCust and move the cursor to a control named TaxExempt on that form:

'Open my NewCust form in Form view. DoCmd.OpenForm "NewCust", acNormal

'Move the cursor to the Tax Exempt control. Forms![NewCust]![Tax Exempt].SetFocus

Was this article helpful?

0 0

Responses

  • Racquel
    How do I move my cursor to a specific control on a access form?
    8 years ago

Post a comment