More help with DCOUNT multiple criteria

Iamrickdeans

Registered User.
Local time
Today, 12:54
Joined
Apr 8, 2013
Messages
29
Again Thanks in advance to the communities help in furthering my understanding and learning of access...

After some helpful replies in regards to the DCOUNT function I am still having troubles...

So I can get my formula to work with
=DCount("*","Client","[StockTypeCIT] = 'ROCK'")
This gives me a count on the total number of products that I am argumentally calling 'Rock' however I am trying to use the active account number on a form to count only the products called 'Rock' for that particular active client.

What I have been trying is variants of
=DCount("*","Client","[StockTypeCIT] = 'Rock' And [Client Account NumberStock]= '[Active Client Account Number]'")
FYI [Active Client Account Number] is the field name for the active account number on my form...

I the numerous versions of this all provide me with multiple errors any help as I say appreciated I guess it is the arrangement or the formatting of the latter part but I am lost!
Thanks everyone

Regards



Richard


 
Last edited:
If [Client Account NumberStock] is data type text, try:
=DCount("*","Client","[StockTypeCIT] = 'Rock' And [Client Account NumberStock]= '" & [Active Client Account Number] & "'")
If [Client Account NumberStock] is data type number, try:
=DCount("*","Client","[StockTypeCIT] = 'Rock' And [Client Account NumberStock]= " & [Active Client Account Number])
 
Maybe this is where the problems are whilst all client numbers are uniquesome of the client account numbers are numbers such as 123456 and others are A12345 or B12345.

Can this be adapted in anyway to work with both types of data? Within excel you could write IF(LEFT="A"... for example is their functionality of that type within Access?

Regards

Richard
 
Just another big Thank you, Bob I have managed to solve my problem your help and advice was paramount in it's resolution I cannot thankyou enough!


Regards

Richard
 

Users who are viewing this thread

Back
Top Bottom