resetting form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When entering info into a form and clicking for the next form, the cursor stays where it left off in the previous form. Is there anyway to have it reset to the top field

Thanks!
 
Rawley,

1. Open the form in design view.
2. Double-click anywhere on the form to display the Properties dialog.
3. Select the form by clicking in the darker region (outside the extents of
the form itself).
You'll see the title of the Properties dialog change to "Form".
4. Select the Events tab.
5. Click in the Current event. You'll notice two buttons appear to the
right.
6. Click the rightmost button.
7. If the Choose Builder dialog appears, select Code Builder, and click OK.
The event procedure stub will be created, like so:
Private Sub Form_Current()

End Sub

8. Add the following line of code between the Private Sub... and End Sub
block.
Me.txtSomeTextbox.SetFocus

9. If necessary, rename txtSomeTextBox to the name you've used for your
textbox.
10. From the File menu, click Save.
11. Close the window.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Back
Top