?
Solved

Microsoft Access:  How to Count and ID Records in Found Set "Record X of Y found"

Posted on 2003-03-24
16
Medium Priority
?
193 Views
Last Modified: 2006-11-17
Without showing the status bar, how do I show
'Record X of Y (found)' in the form footer for
a series of records?  The word Found would only
be included list was filtered.

How do I effectively show number of records found
in subform on primary form?
6 Orders Found


Looking for a simple solution... hopefully no
major coding.

CM Capital
0
Comment
Question by:CMCapital
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 3
  • +1
16 Comments
 
LVL 2

Expert Comment

by:Jzaltheral
ID: 8198383
Function NoOfRecords

0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 280 total points
ID: 8198573
You're going to need a little coding for this.

Create a label with some text, called something like lblFound. You can then use code like this in the OnCurrent event of the form:
Dim strText As String

Me.RecordsetClone.MoveLast
strText = Me.RecordsetClone.Recordcount & " Orders"
If Me.FilterOn=True Then strText = strText & " Found"
Me!lblFound.Caption = strText

To show the records in a subform, replace Me.RecordsetClone to Me!MySubformControl.Form.RecordsetClone (where MySubformControl is the name of your subform *control* not the subform itself) and Me.FilterOn to Me!MySubformControl.Form.FilterOn.
0
 
LVL 2

Expert Comment

by:Jzaltheral
ID: 8198575
Function NoOfRecords

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Jzaltheral
ID: 8198581
Please pardon my double post - my PC has been acting up today - shane has provided a good solution so I'll save mine for another time.

Jzal
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 8198777
what about X of Y? you solved X shane, but what about total records?

nex
0
 

Author Comment

by:CMCapital
ID: 8198804
Thanks, that does work for X...

As for Y, any ideas?

C M Capital
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 8198848
i'm sorry. shane, your solution says:

10 orders found

but not:

order 6 of 10

what do you want CMCapital
0
 

Author Comment

by:CMCapital
ID: 8198863
Ill wait for them to try again.  I only have 70
points--sorry, wish I could offer more.

B. W.
C M Capital
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 8198880
shane will be back soon. the only time he isn't on Experts Exchange is when he is traveling back and forth from work. =)

nex
0
 

Author Comment

by:CMCapital
ID: 8198954
Note:
Answer to X of Y found at
http://www.experts-exchange.com/Databases/MS_Access/Q_10978341.html

1 line private funcion on form.

Thanks to Shane for help.

B.W.
C M Capital
0
 

Author Comment

by:CMCapital
ID: 8198958
See comments
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 8199133
<mumble> Sorry, was watching TV...

Nex, I work from home :)
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 8199949
i know, you told me. but the computer chair to the couch takes a while. =)

nex
0
 
LVL 12

Expert Comment

by:nexusnation
ID: 8199956
and there are a lot of cds and food *cough* traffic *cough* that you must dodge <big grin>
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 8200385
I gotta laptop...so the computer chair *is* the couch <vbg>
0
 

Author Comment

by:CMCapital
ID: 8204519
Very funny guys.  :-D

0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question