Automatically Going to top of form (1 Viewer)

stu_c

Registered User.
Local time
Today, 04:13
Joined
Sep 20, 2007
Messages
489
Hi all
I have a form with sub forms etc, across the bottom I have buttons that allows the users to scroll through the different records, one of the buttons allows users to crate a new record, it is possible that when this is clicked it takes the user back to the top of all forms?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:13
Joined
Oct 29, 2018
Messages
21,453
Have you tried using the SetFocus method? I'm not sure what you mean by top. You can set the focus to the first Textbox.
 

stu_c

Registered User.
Local time
Today, 04:13
Joined
Sep 20, 2007
Messages
489
Have you tried using the SetFocus method? I'm not sure what you mean by top. You can set the focus to the first Textbox.
I have yes, It puts the cursor in that box but does not put the scroll bar back to the top of each from
 

Gasman

Enthusiastic Amateur
Local time
Today, 04:13
Joined
Sep 21, 2011
Messages
14,231
Well hopefully the subform would be linked to the main form, so a new record would not show anything?
Otherwise I would have thought you would need to MoveFirst for each recordset in each subform?
Or simply requery them?
 
Last edited:

LarryE

Active member
Local time
Yesterday, 20:13
Joined
Aug 18, 2021
Messages
581
DoCmd.GoToRecord acActiveDataObject, , acFirst
 

Users who are viewing this thread

Top Bottom