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

Top