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!

How to Show Record Number ONLY on Form?

Status
Not open for further replies.

asfhgwt

Technical User
Aug 3, 2006
11
US
Anyone know an easy way to show the current record number on a record-filtered form -- without showing the navigation arrows? (I don't use control numbers.) Example: There are 1000 records in the "Main" table. The form is filtered and shows only those west of the Mississippi river -- 400 records. I'd like to see the numbers 1 through 400 on my form when scrolling using my own scroll buttons.

Thanks!
 
I do not think you can, however, you can set a textbox to:
=[CurrentRecord]
 
Yes, of course. I should have known. Mea culpa.

THANKS!
 
Now how do I show ALL the records? Can't find anything like [TotalRecords]....



 
=Recordset.RecordCount didn't work. I tried tablename.recordcount and formname.recordcount, and everything else I could think of... to no avail.

...but thanks for the suggestion....

A.
 
Is it on a form that has a recordset? How about:
=RecordsetClone.RecordCount
 
Thhe form has this in the Filter property:

((((Main.[Account Type])<>"NON" And (Main.[Account Type])<>"TBF")))

Recordset Type is Dynaset.

So what exactly should I put in the text box on the form...?

Thanks,
ASF
 
Are you using an ADO recordset? If so, can you use the recordcount property of the recordset?
I tested on a form with an ADO recordset and
=Recordset.Recordcount
worked as the control source of a textbox. [ponder]
 
Not sure what you mean... just use defaults when creating form. Tried with a test form and no good. It looks like this in the form's property sheet:

=[recordset].[RecordCount]

... but comes up #Name? in the field.

A.
 
Also, did you try:
=RecordsetClone.Recordcount
 
I use this in the Form_Current sub:

Me.Caption = "Record " & CurrentRecord & " Of " & RecordsetClone.RecordCount & " Records"

but it could be adapted to display elsewhere.

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
=RecordsetClone.Recordcount WORKED!!!!

Thanks!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top