A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Displaying Total Amount Of Records In A Table



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2010, 03:34 PM posted to microsoft.public.access
dmills
external usenet poster
 
Posts: 19
Default Displaying Total Amount Of Records In A Table

I would like to display the amount of records that are in a table on the form
- do I use a text box and assign the control source somehow...?

Thank you in advance
  #2  
Old March 17th, 2010, 03:53 PM posted to microsoft.public.access
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Displaying Total Amount Of Records In A Table

You could use something like below in the control source on an unbound text
field in the form. I would work best if you put in the primary key field name
in FieldName.

DCount("[FieldName]", "TableName")
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"dmills" wrote:

I would like to display the amount of records that are in a table on the form
- do I use a text box and assign the control source somehow...?

Thank you in advance

  #3  
Old March 17th, 2010, 04:57 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Displaying Total Amount Of Records In A Table

On Wed, 17 Mar 2010 08:34:05 -0700, dmills
wrote:

I would like to display the amount of records that are in a table on the form
- do I use a text box and assign the control source somehow...?

Thank you in advance


Try a textbox with a control source

=Count("*", "YourTableName")

This will count all the records in the table, irrespective of the recordsource
of the form, which might be a query or might be filtered.

If that's not what you want post back.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.