Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 03:02 PM
Michael Charney
Guest
 
Posts: n/a
Default Total Records on a Form

I have a form that is based on a query. The form is a vertical colume
layout format. Headers for each colume and then the data is displayed
below it.

I have a control on the Header of the form that I want to display the
total number of records that were returned from the query. How would I
do this?

Everything I try either comes back as #ERROR or #NAME?.

Any on ehave any ideas?

Michael Charney


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2  
Old November 12th, 2005, 03:02 PM
PC Datasheet
Guest
 
Posts: n/a
Default Re: Total Records on a Form

Michael,

Put the following expression in the OnOpen event of the form:

Me!NameOfTotalsTextbox = Me.RecordsetClone.RecordCount


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com


"Michael Charney" <mbcharney@sbcglobal.net> wrote in message
news:3f81bc28$0$195$75868355@news.frii.net...[color=blue]
> I have a form that is based on a query. The form is a vertical colume
> layout format. Headers for each colume and then the data is displayed
> below it.
>
> I have a control on the Header of the form that I want to display the
> total number of records that were returned from the query. How would I
> do this?
>
> Everything I try either comes back as #ERROR or #NAME?.
>
> Any on ehave any ideas?
>
> Michael Charney
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]


  #3  
Old November 12th, 2005, 03:03 PM
Pieter Linden
Guest
 
Posts: n/a
Default Re: Total Records on a Form

Might be pure fluke, but I got this to work:

=DCount("[MS_WANC]","Query1","1=1")

Query1 is the object the form is based on, "MS_WANC" is a field in the query...
  #4  
Old November 12th, 2005, 03:03 PM
Stuart MacKinnon
Guest
 
Posts: n/a
Default Re: Total Records on a Form

Michael Charney <mbcharney@sbcglobal.net> wrote in message news:<3f81bc28$0$195$75868355@news.frii.net>...[color=blue]
> I have a form that is based on a query. The form is a vertical colume
> layout format. Headers for each colume and then the data is displayed
> below it.
>
> I have a control on the Header of the form that I want to display the
> total number of records that were returned from the query. How would I
> do this?[/color]

If the underlying query is called "qryMyQuery", then try pasting this
in an empty text box.

=DCount("*","qryMyQuery")

HTH

Regards
Stuart
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.