Displaying last record number

  • Thread starter John Harrington
  • Start date
J

John Harrington

In Access, you can very easily display the current record number.
Say, for a text box, you simply set the Control Source to "=
[CurrentRecord]".

My question: what if you want to display the number of the LAST record
in the table (put another way display the total number of records in
the table)? What do you put in the Control Source to do that?


Thanks,
John
 
J

John Harrington

In Access, you can very easily display the current record number.
Say, for a text box, you simply set the Control Source to "=
[CurrentRecord]".

My question: what if you want to display the number of the LAST record
in the table (put another way display the total number of records in
the table)?  What do you put in the Control Source to do that?

To answer my own question, I've since discovered that putting "=Count
([FieldName])" in the Control Source works, where "FieldName" is the
name of any field in the table. "=Count([FieldName])" gives the
extent of the table, including the new record (which is how they count
it in the nav bar).


John
 
J

Jeff Boyce

John

If you are using the Nav bar, be aware that the "record numbers" there are
relative, not absolute. That is, depending on how you sort the data, or the
selection criteria, you won't always get the same "record # 7" using (only)
the Nav bar...

Regards

Jeff Boyce
Microsoft Office/Access MVP

In Access, you can very easily display the current record number.
Say, for a text box, you simply set the Control Source to "=
[CurrentRecord]".

My question: what if you want to display the number of the LAST record
in the table (put another way display the total number of records in
the table)? What do you put in the Control Source to do that?

To answer my own question, I've since discovered that putting "=Count
([FieldName])" in the Control Source works, where "FieldName" is the
name of any field in the table. "=Count([FieldName])" gives the
extent of the table, including the new record (which is how they count
it in the nav bar).


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top