D
Dirk
I'm working with Access 2002 and I'm able to show a count of records
using a label on a form without using the Access navigational buttons.
I have created my own custom navigational command buttons. The label
works fine except when the form loads for the first time. The label
displays that I have 50 records when I really have over 400. Once I
start navigating using custom buttons, the record count appear
correctly and remains correct during other operations (adding new
record, deleting record etc.). It's only when the form loads for the
first time. This is the code I've used in the Form_Current event
handler.
Dim rs As Recordset
Dim rc As Long
Set rs = Me.RecordSetClone
With rs
.MoveFirst
.MoveLast
rc = .RecordCount
End With
Me.label46 = "Record " & Me.CurrentRecord & " of " & rc
Do I need to add code to the Form_Load Event. Any help would be
greatly appreciated.
Dirk
using a label on a form without using the Access navigational buttons.
I have created my own custom navigational command buttons. The label
works fine except when the form loads for the first time. The label
displays that I have 50 records when I really have over 400. Once I
start navigating using custom buttons, the record count appear
correctly and remains correct during other operations (adding new
record, deleting record etc.). It's only when the form loads for the
first time. This is the code I've used in the Form_Current event
handler.
Dim rs As Recordset
Dim rc As Long
Set rs = Me.RecordSetClone
With rs
.MoveFirst
.MoveLast
rc = .RecordCount
End With
Me.label46 = "Record " & Me.CurrentRecord & " of " & rc
Do I need to add code to the Form_Load Event. Any help would be
greatly appreciated.
Dirk