DCount funtion in Form

prabhus

Registered User.
Local time
Today, 05:04
Joined
Mar 14, 2012
Messages
67
Hi,

I want show the count data in one of my form. So i use Dcount in control source but i get Error for the below 2 fields.

=DCount("[A2p]","[Customer Table1]","[A2p]='No'")

A2p - is field from table Customer Table1 in this i want to count the No
A2p is text box format in my table.

=DCount("[DateU]","[Customer Table1]","[DateU]='date()'")
DateU - is the field from Customer Table1 in this i want to count records matching the today.
DateU is in date format in my table.

I tried to bound the box used count option but not working.
 
What is the error number and error description you get?
 
like this #Error
 
Try changing the , to ;:
Code:
=DCount("[A2p]"[COLOR=Red][B];[/B][/COLOR]"[Customer Table1]"[B][COLOR=Red];[/COLOR][/B]"[A2p]='No'")
 
Try..
Code:
=DCount("*", "[Customer Table1]", "[A2p]='No'")
=DCount("*", "[Customer Table1]", "[DateU]= " & Format(Date(), "\#mm\/dd\/yyyy\#"))
 
I tried both and still have the same error.

When i try like this its working =DCount("[A2p]","[Customer Table1]")
but this not meeting my requirement, i want have the data with No.

I get this "No" from the users updating the check box and in my table i kept the field property as textbox in datatype--->lookup---->Display control.

Is anything to do with this?
 
Paul, in my languish it is ";" used in Control Source: :)

attachment.php
 

Attachments

  • Simikolon.jpg
    Simikolon.jpg
    3.8 KB · Views: 146
I get this "No" from the users updating the check box and in my table i kept the field property as textbox in datatype--->lookup---->Display control.
So technically it is not a Text type is it? Try this then..
Code:
=DCount("*", "[Customer Table1]", "[A2p]= False")
In my languish it is ";" used in Control Source:
It depends on the regional settings.. Some environmental settings have semicolon (;) as the separator, widely comma is used.
 
Re: DCount funtion in Form [Solved]

voilà...!!!

Its working!!! Thank you so much...
 
You are welcome. :)

PS: Note that your answer would be quicker if you'd given a very clear picture of how your data is stored. ;) Good Luck !
 

Users who are viewing this thread

Back
Top Bottom