Article ID: 104683
Article Last Modified on 5/6/2003
'*******************************************
' MODULE DECLARATION SECTION
'*******************************************
Option Explicit
Dim RetVal As Variant
'*******************************************
' MODULE FUNCTIONS
'*******************************************
Function GotoFirstRecord ()
RetVal = GotoRecord(A_FIRST)
End Function
Function GotoLastRecord ()
RetVal = GotoRecord(A_LAST)
End Function
Function GotoNextRecord ()
RetVal = GotoRecord(A_NEXT)
End Function
Function GotoPrevRecord ()
RetVal = GotoRecord(A_PREVIOUS)
End Function
Function GotoFirstSubRecord (SubControlName As String)
DoCmd GoToControl SubControlName
RetVal = GotoFirstRecord()
End Function
Function GotoLastSubRecord (SubControlName As String)
DoCmd GoToControl SubControlName
RetVal = GotoLastRecord()
End Function
Function GotoNextSubRecord (SubControlName As String)
DoCmd GoToControl SubControlName
RetVal = GotoNextRecord()
End Function
Function GotoPrevSubRecord (SubControlName As String)
DoCmd GoToControl SubControlName
RetVal = GotoPrevRecord()
End Function
Function GotoRecord (Direction)
On Error Resume Next
DoCmd GoToRecord , , Direction
End Function
Command Button : btnGotoFirstRecord
Caption: <<
OnClick: =GotoFirstRecord()
NOTE: In version 1.x, the OnClick property is called the OnPush
property.
Command Button : btnGotoPrevRecord
Caption: <
OnClick: =GotoPrevRecord()
Command Button : btnGotoNextRecord
Caption: >
OnClick: =GotoNextRecord()
Command Button : btnGotoLastRecord
Caption: >>
OnClick: =GotoLastRecord()
Command Button : btnGotoFirstSubRecord
Caption: <<
OnClick: =GotoFirstSubRecord("Orders Subform")
Command Button : btnGotoPrevSubRecord
Caption: <
OnClick: =GotoPrevSubRecord("Orders Subform")
Command Button : btnGotoNextSubRecord
Caption: >
OnClick: =GotoNextSubRecord("Orders Subform")
Command Button : btnGotoLastSubRecord
Caption: >>
OnClick: =GotoLastSubRecord("Orders Subform")
Additional query words: scrollbar navigate goto
Keywords: kbhowto kbusage KB104683