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

DCount function returning zero records

35 32bit
Hello,

I am trying to count a field ID from Completed (the table name) where the values in a text box (txtFinal) on a form = RPR*. It is coming up with zero records when there are several. Do I have something wrong with the syntax?
Expand|Select|Wrap|Line Numbers
  1. =DCount("[ID]","Completed","[txtFinal] = 'RPR*'")
The count I want to return is the amount of records on the subform where txtFinal = "RPR*".

I tried changing to this:
Expand|Select|Wrap|Line Numbers
  1. =DCount("[ID]","Completed","[Final] = 'RPR-RPR & RTN'")
It is no longer giving me zero. It is now giving me the total number of records in the Table where Final = 'RPR-RPR & RTN', not the total number of records on the subform.

Thanks in advance!

Rhonda

Thanks Neopa! Sorry about not putting the code tags in. I still have a question however. How can I count the number of records where a match is found in the subform instead of the table? It is now counting all matches in the table and not the subform.
Jun 14 '15 #1
1 1956
NeoPa
32,556 Expert Mod 16PB
Rhonda:
Do I have something wrong with the syntax?
Indeed you do Rhonda. You're trying to treat a wildcard-type filter as you would a direct match. The syntax for matching a wildcard is :
Expand|Select|Wrap|Line Numbers
  1. [X] Like 'blah'
Examples of Wildcard Characters may prove useful.
Jun 14 '15 #2

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

Similar topics

1
by: Dan Leeder | last post by:
stroccur = DCount("", "empnotes", " = " & Chr(34) & Me.Rpt_Card_Type & Chr(34) & " And = " & Me.SSN & " And #" & & "# > " & DateSerial(Year(Me.datetime) - 1, Month(Me.datetime),...
1
by: SheldonMopes | last post by:
I'm having difficulty with the DCount function, not getting the results that I want. Field1A and Field2A are fields in TableA matching Field1B and Field2B in TableB Using a calculated...
1
by: lalbee | last post by:
I am trying to use the Dcount function but receive a data type mismatch error, can someone help me determine the cause? Count: DCount("","qry-final everhome results"," <'0' ") Thanks!
2
by: ReubenPatterson | last post by:
Any ideas why a simple Left(,1) query would return no results. If the query is run without criteria it returns all records...thanks in advance.
36
by: bmyers | last post by:
Good afternoon, I am attempting to count only those records within a report, which is based on a query, where Status is equal to Closed. I have tried multiple variations of DCOUNT but am...
1
iBasho
by: iBasho | last post by:
Hi I am using the DCount function to check and alert users for existing IDs in my database after a new record is entered. ..Private Sub CARDID_AfterUpdate() If DCount("*", "", " = '" & Me. &...
1
by: Manuel Baptista | last post by:
Good afternoon, I am attempting to count those records within a data base that do not match one variable answer in a given field. To put it more clearly, I want to count the companies in a...
3
by: slenish | last post by:
Hello All, I am trying to use the DCount Function to count blank records on a table from a form. I want to make it so i can press a button and the function will run and show the total in a text...
2
by: BHudson | last post by:
Can someone help me. why does my dcount function on a text box in a report gives me a zero count when there is clearly 2 employee records in the query that has the number 1 in the heart trainee...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.