resetting form

message from =?Utf-8?B?UkFXTEVZ?= on 5 May 2004
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!
 
Graham R Seach replied to =?Utf-8?B?UkFXTEVZ?= on 6 May 2004
Private Sub Form_Current()
Me.txtSomeTextbox.SetFocus
End Sub

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

"RAWLEY" <anonymous@discussions.microsoft.com> wrote in message
news:0C309FC7-6D92-468E-91CE-C4D2BB3AE1A5@microsoft.com...
stays where it left off in the previous form. Is there anyway to have it
reset to the top field?
 
=?Utf-8?B?cmF3bGV5?= replied to Graham R Seach on 6 May 2004
Where do I enter this code at?

Thanks!
 
Graham R Seach replied to =?Utf-8?B?cmF3bGV5?= on 7 May 2004
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

"rawley" <anonymous@discussions.microsoft.com> wrote in message
news:B097D6F9-D2A5-49A1-8F2B-F31E2C876761@microsoft.com...
 
=?Utf-8?B?cmF3bGV5?= replied to Graham R Seach on 7 May 2004
That worked...thanks!
 

Archived message: resetting form (MS Access Forms)