Focus on last record of a subform after data entry (1 Viewer)

amir0914

Registered User.
Local time
Today, 01:11
Joined
May 21, 2018
Messages
151
Hello all,
there is a subform on the main form in my project and I use another form for data entry. Now I want to set focus on last record of subform after data entry, so I added the codes after insert sql :

Code:
Forms!frm_Main!Sub_Words.SetFocus
DoCmd.GoToRecord , , acLast

but it doesn't work or show any changes on record. (it is fixed on first row).
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:11
Joined
May 7, 2009
Messages
19,169
not tried, but you can:

Forms!frm_Main.Setfocus
Forms!frm_Main!Sub_Words.Setfocus
DoCmd.GoToRecord , , acLast
 

amir0914

Registered User.
Local time
Today, 01:11
Joined
May 21, 2018
Messages
151
not tried, but you can:

Forms!frm_Main.Setfocus
Forms!frm_Main!Sub_Words.Setfocus
DoCmd.GoToRecord , , acLast
Bravo 👏👏
Thanks for helping.
 

Users who are viewing this thread

Top Bottom