Move next rec

livvie

Registered User.
Local time
Today, 15:11
Joined
May 7, 2004
Messages
158
Does anyone know if it is possible to use code to move to the next record on a form without opening a recordset. I am trying to loop thru records on a form in code behind another form.Basically I need to mimic a key press or a click event in code.
 
KenHigg said:
pseudo

sendkey pgdn

???
kh

Tricky as the form I want to move records on is already open but not the form I am using.
Also how do I enter the pgdn command as when I try it as a keystroke it just does the 'Page Down' action and moves me on to the Wait line
 
Last edited:
its something like

docmd.acMoveNext
 
Hi Livvie,

As Surjer said...

Private Sub cmdNext_Click()
DoCmd.GoToRecord , "frmFormName", acNext
End Sub


...removing 2nd aRGUMENT, will move form with focus (calling form)..

Private Sub cmdNext_Click()
DoCmd.GoToRecord , , acNext
End Sub


...other constants
acPrevious
acFirst
acLast
acNew

hOPE THIS HELPS, Good luck!
 

Users who are viewing this thread

Back
Top Bottom