RecordCount Property

J

JamesJ

Hi. I had code to display the number of records using the RecordCount
property in a label but have misplaced it.
The code example in Microsoft Visual Basic help was way more than I needed.
Can someone point me to an example?

Any help will be appreciated,
James
 
M

missinglinq via AccessMonster.com

YourLabelName.Caption = "Record " & CurrentRecord & " Of " &
RecordsetClone.RecordCount & " Records"
 
F

fredg

Hi. I had code to display the number of records using the RecordCount
property in a label but have misplaced it.
The code example in Microsoft Visual Basic help was way more than I needed.
Can someone point me to an example?

Any help will be appreciated,
James

If you use an unbound Text control:
=[RecordsetClone].[RecordCount]

If you wish to display the count in a Label control, you'll need to
use VBA code.

Me!LabelName.Caption = Me.[RecordsetClone].[RecordCount]
 
J

JamesJ

In a label but can't get it to work.
Should the code be in the On Current of the form?

James

fredg said:
Hi. I had code to display the number of records using the RecordCount
property in a label but have misplaced it.
The code example in Microsoft Visual Basic help was way more than I
needed.
Can someone point me to an example?

Any help will be appreciated,
James

If you use an unbound Text control:
=[RecordsetClone].[RecordCount]

If you wish to display the count in a Label control, you'll need to
use VBA code.

Me!LabelName.Caption = Me.[RecordsetClone].[RecordCount]
 
F

fredg

In a label but can't get it to work.
Should the code be in the On Current of the form?

James

fredg said:
Hi. I had code to display the number of records using the RecordCount
property in a label but have misplaced it.
The code example in Microsoft Visual Basic help was way more than I
needed.
Can someone point me to an example?

Any help will be appreciated,
James

If you use an unbound Text control:
=[RecordsetClone].[RecordCount]

If you wish to display the count in a Label control, you'll need to
use VBA code.

Me!LabelName.Caption = Me.[RecordsetClone].[RecordCount]

Yes, the Current event should work fine.
 
Top