Count different

accessman2

Registered User.
Local time
Today, 14:35
Joined
Sep 15, 2005
Messages
335
Hi,

I have a question.
Suppose there is a table:
Vendor__________Code ......................
A________________1
A________________2

Dcount("Code","table","Vendor = A") = 2

It is fine.

Vendor__________Code ......................
A_______________1
A_______________1
A _______________2

Dcount("Code","table","Vendor = A") = 3

I want to count the different between the code, it should be 2.

I don't want to create the query to group it and then count the query, because the values of the rest of the fields of the table may be different.

Does any function for count different? Thanks.
 
Seach the Access help files for the DSum() function with criteria.
 
I don't want to create the query to group it and then count the query, because the values of the rest of the fields of the table may be different.
Queries only select the columns you want them to select so I don't understand this statement. Create the query to group the data, then use a totals query to count it. Do not use DLookup()s.
 
Hi accessman2,

If the table is in order from 1, 2, ....... then why don't you try using DLast() Function which will give you the result.

If not then place it in a query in ascending order and then use the DLast in order to get the last records in order.

Is this the result you are after?:p

Robert88
 

Users who are viewing this thread

Back
Top Bottom