T Tony Jun 3, 2004 #1 How can I write a code to check if the current record is first or last record. Thank you in advance, Tony
How can I write a code to check if the current record is first or last record. Thank you in advance, Tony
M Marshall Barton Jun 4, 2004 #2 Tony said: How can I write a code to check if the current record is first or last record. Click to expand... 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.
Tony said: How can I write a code to check if the current record is first or last record. Click to expand... 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.