View Full Version : going to a new record


gbanks
09-14-2001, 08:00 AM
I would like to have a button on a subform that when pressed would take me to the next record on the main form which by there linked fields would be the next form on the sub form as well. Does anyone have some code to do this? Thanks. And God Bless.

Travis
09-18-2001, 11:46 AM
Try This:

Private Sub Command1_Click()
On Error Resume Next
Me.Parent.RecordSet.MoveNext
If Err.Number <> 0 then
Msgbox "No More Records on the Parent Form"
End If
End Sub

gbanks
09-19-2001, 03:26 AM
Thanks Travis!!