473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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!
Nov 12 '05 #1
3 7634
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" <mb*******@sbcglobal.net> wrote in message
news:3f*********************@news.frii.net...
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!

Nov 12 '05 #2
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...
Nov 12 '05 #3
Michael Charney <mb*******@sbcglobal.net> wrote in message news:<3f*********************@news.frii.net>...
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?


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

=DCount("*","qryMyQuery")

HTH

Regards
Stuart
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Hall | last post by:
The records in my database are displayed in a form as follows: %> <form action="report-ammend1.42.asp" method="post"name="form"> <table border=1> <% x = 1
1
by: Think | last post by:
I want to build a new field based on field START_TIME (1.12.2003 1:37:32) called TOTAL_NUMBER_OF_CALLS. In this field I want to have a number of total records. That number I see at the bottom of...
2
by: Ryan | last post by:
Access97 I hope someone out there can help. This is driving me crazy. Basically, I am trying to recreate VBA's built in navigation feature (The one that allows you to move first, next,...
0
by: Ellen Manning | last post by:
I've got an A2K form with a subform based on a query. This query has a checkbox and an amount field and returns records if checkbox is checked. I Dsum the amount field and display on the main...
0
by: Richard Holliingsworth | last post by:
Hello: I'm building a report to display statistics on the entire database. I have successfully built a report that groups the entire db on one field and gives me a count of db records for the...
16
by: ken | last post by:
I have a formA and subformB subformB is a continous form with a txtTotal in form footer =Sum() This works fine as long as there are records in form but if form is null I get Error I would like...
3
by: JDiamond | last post by:
Hi, I have a table called Hosts. The Hosts table contains the following fields: Each field represents a step in the project. The tech that completes each step initials the respective...
2
by: dath | last post by:
Hi, Not really a programmer here, but have been forced into the role. I was asked to develop a basic time sheet for employees to enter time. I developed the Table without a problem. I then...
19
by: hotflash | last post by:
Hi CroCrew et. All, I am currently working on a quick report that count a total of completed records per Individual. The code that I have will add up all Individual completed records and what I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.