Record number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guys,

Does any of you know how to show the current record number and record count
in a form, other than using the standard navigation buttons at the bottom of
the screen?

Thanx,
Jenn
 
Create a (calculated) TextBox on your Form with ControlSource:

= [CurrentRecord] & " of " & [Recordset].[RecordCount]

(tested in A2K2).
 
Create a (calculated) TextBox on your Form with ControlSource:
= [CurrentRecord] & " of " & [Recordset].[RecordCount]
Hi, thanks for responding. When I apply the above code in the TextBox and
run the form, the TextBox shows #Name?. Obviously, I am doing something wrong
here.

Thanks,
Jenn
 
I tested it A2K2 and it worked fine on my laptop.

However, IIRC, there may be timing issue with this if you use a slow
computer or the Form's Recordset is big.

Leave the TextBox unbound and use the Form_Current Event to set the value of
the TextBox. Something like:

Me.MyTextBox = Me.CurrentRecord & " of " & Me.Recordset.RecordCount

--
HTH
Van T. Dinh
MVP (Access)



Jennifer-Ashley said:
Create a (calculated) TextBox on your Form with ControlSource:

= [CurrentRecord] & " of " & [Recordset].[RecordCount]
Hi, thanks for responding. When I apply the above code in the TextBox and
run the form, the TextBox shows #Name?. Obviously, I am doing something wrong
here.

Thanks,
Jenn
 
Leave the TextBox unbound and use the Form_Current Event to set the value of
the TextBox. Something like:

Me.MyTextBox = Me.CurrentRecord & " of " & Me.Recordset.RecordCount
Wow thanks, that worked! Nonetheless, I recently bought this computer, it is
very fast ans has more than 1 mB of internal memory. Anyways, it works.

Bye,
Jenn
 
Back
Top