Textbox Query Count

hatstand

Well-known Member
Joined
Mar 17, 2005
Messages
778
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

A simple problem (I hope) a that is driving me crazy. I am trying to return the record count of a query into a form using a Textbox. I have tried '=Count([Qry_New_Feed_Names]![Feed_Name])' in the control source yet it gives a #Error . Using the same Expression in a query returns the result. Am I missing the obvious?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi I think you will have to give more information. I'm not sure what you are trying to count. Also this is not a query so I'm not sure why it would work in a query. Normally a DCount() function would be used here.
 
Upvote 0
Hi,

I have a query that has one field where new 'feeds' are shown. So the field might have 'cat, dog, cow' as they are new to the database. I want to show how many new 'feeds' there are by counting them. So the Textbox would return '3'. I can recall doing this before, but dammed if I can remember how to do it.
 
Upvote 0
Hi,
you would use DCount for this, probably:
=DCount([FieldName],[QryName])
 
Upvote 0
That did it, I just replaced the '[' with '"'. Thanks for your, very much appreciated.
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,185
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top