In putting in this code, into my db, I ran into the usual problem of an undefined method.
The code is for both the next and the previous buttons now shown :
Code:
Private Sub Back_Click()
Me.RecordsetClone.MovePrevious
If Not Me.RecordsetClone.BOF Then
DoCmd.GoToRecord acForm, Me.Name, acPrevious
Else
Me.RecordsetClone.MoveFirst
MsgBox "First record."
Me.Back.Enabled = False
End If
Me.Foward.Enabled = True
End Sub
Private Sub Foward_Click()
Me.RecordsetClone.MoveNext
If Not Me.RecordsetClone.EOF Then
DoCmd.GoToRecord acForm, Me.Name, acNext
Else
Me.RecordsetClone.MoveLast
MsgBox "Last record."
Me.Foward.Enabled = False
End If
Me.Back.Enabled = True
End Sub
When I press the next or previous buttons in frmEmail it fails in the same place. The screenshots of the code and its failure are shown
in the attached two files. As is obvious from them the code fails in the exact same place on both Subs.
I would like to know how to put in VBA code complete or whole. By that I mean that for now I click on the ellipsis
in property sheet and it gives me the first and last lines of the sub. It chooses the names. So when I put in the code I put it all
in and then delete the first and last lines of my code. This takes the recommendation of MS Access 2010 for sub names, but sometimes
I want my own names, not ones that Access gives me by default. There must be a way to do this.
Any help appreciated. Thanks in advance.
Respectfully,
Lou Reed