I want to use the DCount function in my Visual Studio Project but DCount gets underlined with a squiggly line and the tooltip says "Not declared" What is the solution?
Asked
Active
Viewed 323 times
1 Answers
0
I don't know which language you are using in Visual Studio (I suspect VB.NET), but DCount is not available neither VB.NET nor C#, it is an Access VBA function. It can't be used in SQL queries either, when you want to retrieve data from Access.
You can count the number of records however by using a SQL expression like
SELECT COUNT(*) FROM ExampleTable WHERE FieldToCount = 'SpecificSelection'
or using LINQ.

Bouke
- 1,531
- 1
- 12
- 21
-
Thank you very much – Chandrasekharan K Oct 06 '16 at 02:48