By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,082 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

Display No Of records in an Access 2002 database form

P: n/a
Hi, I want to display the number of records in a form on an access
2002 database.

I know that under properties you can select navigation button, which
allows the user to flick through the records and see which record
number it is and how many records there are.

But I want to be able to display the number of records myself on the
form, without using the access version.

Kindest regards
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Cillies" <le*@prologic.ie> wrote in message
news:ba**************************@posting.google.c om...
Hi, I want to display the number of records in a form on an access
2002 database.

I know that under properties you can select navigation button, which
allows the user to flick through the records and see which record
number it is and how many records there are.

But I want to be able to display the number of records myself on the
form, without using the access version.

Kindest regards


Create the following function:
--------------------------------------------------
Public Function NumRecs() As Long
Dim RS As Recordset
Set RS = CodeContextObject.RecordsetClone
If RS.RecordCount Then
RS.MoveLast
NumRecs = RS.RecordCount
Else
NumRecs = 0
End If
End Function
-------------------------------------------------

In a Textbox on your form put =NumRecs()
on its Control Source.

Ciao
Bruno
Nov 13 '05 #2

P: n/a
On 26 Oct 2004 07:24:48 -0700, Cillies wrote:
Hi, I want to display the number of records in a form on an access
2002 database.

I know that under properties you can select navigation button, which
allows the user to flick through the records and see which record
number it is and how many records there are.

But I want to be able to display the number of records myself on the
form, without using the access version.

Kindest regards


in an unbound control:

=[Recordset].[RecordCount]
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

P: n/a

Thanks Guys! Much appreciated. And Fred thanks for the simple solution

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.