Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing Record "1 of n" in text box on form 1

Status
Not open for further replies.

adamcbest

MIS
Feb 6, 2006
38
US
does anyone know the binding code to show a somethign like "Record 1 of 5" in a text box in access. I know how to make everything work and switch records and refresh the box. I simply don't know the code to show the select record number. I have this as the control source of the text box.


="Record: " & UNKNOWN & " of " & Count(Record)
 
Take a look at the caption property of a label and the DCount function in VB.

This sounds like what you're looking for.

"If you say you can, or you say you can't, you're right!"
-- Henry Ford
 
the dcount gives the total count that is on the form. actual in my case counting the records on my form is more easily done by using the Count function on the primary key of the form. The total isn't the problem it's funding which of the records in the total is select.

the 2 of "Record 2 of 5"

the 10 of "Record 10 of 234"

Those are the numbers i can't get. It's basically what is shown in the record navigation of the form, but the Form navigation has things i don't need, and it makes my form look much more cluttered and hard to read. So i'm making my own.

Thanks
 


The AbsolutePosition of the recorset could be suitable, but only for scrollable recordset cursor types
The best for recordcount should be this sql
SELECT Count(*) FROM YourTableName,
but will fail when filtering...

 
Hi!

I think you are looking for: Me.CurrentRecord

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top