Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2008

Tip: Looking for answers? Try searching our database.

GoTo Next Record coding

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
smk23 - 12 Mar 2008 15:21 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.