• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

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

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
CMCapital
Asked:
CMCapital
  • 5
  • 5
  • 3
  • +1
1 Solution
 
JzaltheralCommented:
Function NoOfRecords

0
 
shanesuebsahakarnCommented:
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
 
JzaltheralCommented:
Function NoOfRecords

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
JzaltheralCommented:
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
 
nexusnationCommented:
what about X of Y? you solved X shane, but what about total records?

nex
0
 
CMCapitalAuthor Commented:
Thanks, that does work for X...

As for Y, any ideas?

C M Capital
0
 
nexusnationCommented:
i'm sorry. shane, your solution says:

10 orders found

but not:

order 6 of 10

what do you want CMCapital
0
 
CMCapitalAuthor Commented:
Ill wait for them to try again.  I only have 70
points--sorry, wish I could offer more.

B. W.
C M Capital
0
 
nexusnationCommented:
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
 
CMCapitalAuthor Commented:
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
 
CMCapitalAuthor Commented:
See comments
0
 
shanesuebsahakarnCommented:
<mumble> Sorry, was watching TV...

Nex, I work from home :)
0
 
nexusnationCommented:
i know, you told me. but the computer chair to the couch takes a while. =)

nex
0
 
nexusnationCommented:
and there are a lot of cds and food *cough* traffic *cough* that you must dodge <big grin>
0
 
shanesuebsahakarnCommented:
I gotta laptop...so the computer chair *is* the couch <vbg>
0
 
CMCapitalAuthor Commented:
Very funny guys.  :-D

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 5
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now