473,416 Members | 1,534 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,416 software developers and data experts.

counting number of records returned

553 512MB
HI

Is there a way to count number of Records on a continous form.
Or
Is there a way of finding number of records returned when we set recordsource of a form like this:

Expand|Select|Wrap|Line Numbers
  1. Me.Form.RecordSource  = 'SQL Query'
  2.  
Thanks
Qi
Aug 29 '07 #1
3 2070
Rabbit
12,516 Expert Mod 8TB
Me.Recordset.RecordCount
Me.SubformName.Form.Recordset.RecordCount
Aug 29 '07 #2
questionit
553 512MB
Thanks Rabbit ......
Me.Recordset.RecordCount
Me.SubformName.Form.Recordset.RecordCount
Aug 29 '07 #3
You can also use the code below by just replacing the dlookup with dcout it has alot of flexabilty with the critiria in what record you count cheers

'A Function with No Criteria

1.) =DLookUp("[LastName]", "Employees")
-----------------------------------------------------------------------------------------------------
'Specifying Numeric Criteria

1.) =DLookUp("[LastName]", "Employees", "[EmployeeID] = 7")
-----------------------------------------------------------------------------------------------------
'Specifying Numeric Criteria That Comes from a Field on a Form

1.) =DLookUp("[LastName]", "Employees",
"[EmployeeID] = " & Forms![Orders]![EmployeeID])

2.) =DLookUp("[LastName]", "Employees",
"[EmployeeID] = Forms![Orders]![EmployeeID]")
----------------------------------------------------------------------------------------------------
'Specifying Textual Criteria

1.) =DLookUp("[Title]", "Employees", "[LastName] = 'Callahan'")

2.) =DLookUp("[Title]", "Employees", "[LastName] = ""Callahan""")
-----------------------------------------------------------------------------------------------------
'Specifying Textual Criteria That Comes from a Field on a Form

1.) =DLookup("[ContactName]", "[Customers]",
"[CustomerID]='" & Forms![Orders]![CustomerID] & "'")
-----------------------------------------------------------------------------------------------------
'Specifying Date Criteria

1.) =DLookUp("[LastName]", "Employees", "[BirthDate] = #01-27-66#")
-----------------------------------------------------------------------------------------------------
'Specifying Multiple Fields in the Criteria

1.) =DLookUp("[OrderID]", "Orders",
"[CustomerID] = 'SIMOB' And [EmployeeID] = 2")

2.) Result = DLookup("[OrderID]", "Orders",
"[CustomerID] = '" & CustID & "' And [EmployeeID] = " & EmpID)
-----------------------------------------------------------------------------------------------------
Aug 29 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Tony Johansson | last post by:
Hello Experts! I reading a book called programming with design pattern revealed by Tomasz Muldner and here I read something that I don't understand completely. It says "A garbarage...
1
by: Tony Johansson | last post by:
Hello Experts! I reading a book called programming with design pattern revealed by Tomasz Muldner and here I read something that I don't understand completely. It says "A garbarage...
3
by: Megan | last post by:
hi everybody- i'm having a counting problem i hope you guys and gals could give me some help with. i have a query that retrieves a bevy of information from several different tables. first let...
18
by: ChadDiesel | last post by:
I appreciate the help on this group. I know I've posted a lot here the last couple of weeks, but I was thrown into a database project at my work with very little Access experience. No other...
4
by: MLH | last post by:
I have a combo box control on a form and a text box beside it in which I would like to display the number of listings in the combo-box. The combo box lists more or fewer rows depending on the...
13
by: Regnab | last post by:
The problem I'm having is the rsa.RecordCount always returns a '1' when I know there should be about 1600 records returned. I read somewhere that one should use '.MoveLast' before recordcount but...
9
by: GeRmIc | last post by:
Hi, I receive an XML string like <record> <value>...</value> </record> <record> <value>...</value> </record>....... etc.,
3
by: Sir Hystrix | last post by:
Hi, I am struggling with a simple query, but I just don't see it. I have the following example table. Table Messages ID Subject Reply_to 1 A 0 2 Ax 1 3 A 1
3
by: JacobZ | last post by:
Hey all, I've been struggling with this problem for a few days now. The table looks like this T_PROJECT_FILES fields: projectId, unitId Now, I want to count the number of records with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.