First and Last record check?

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

How can I write a code to check if the current record is
first or last record.

Thank you in advance,
Tony
 
Tony said:
How can I write a code to check if the current record is
first or last record.


If Me.CurrentRecord = 1 Then
'First record
ElseIf Me.CurrentRecord = Me.recordsetClone.RecordCount Then
'Last record
Else
'not first or last
End

If you do not get the right number for RecordCount, then add
a Me.RecordsetClone.MoveLast to the form's Load event.
 
Back
Top