GoTo Next Record coding

S

smk23

I am trying to make a public sub that advances to the next record in a
subform. In the following code, I get the error "method not available" on the
"application..." line.
The function to check if the record is the last is working fine.

Is my problem that the code doesn't know what to advance? Is this better on
the form module? My reason for making it a general module is that I need to
do this on several forms (efficiency of code).

Public Sub sRecordNext(frm As Form)
On Error GoTo Error_Handler

If Not fRecordIsLast(frm) Then
Application.RunCommand (acCmdRecordsGoToNext)
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

goto specific subfrm recordset 2
Subform Navigation 2
Error 2950 RunCode 2
If Statement 7
Spell check still causing problems 12
Error Handling 5
Passing form name 11
Problem With IsFormLoaded Do Loop Code 1

Top