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
Klatuu - 12 Mar 2008 16:27 GMT
Try using Docmd instead of Application

Signature
Dave Hargis, Microsoft Access MVP
> 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
[quoted text clipped - 11 lines]
> Application.RunCommand (acCmdRecordsGoToNext)
> End If