Counting Values in Continuous Form

mreference

Registered User.
Local time
Today, 21:46
Joined
Oct 4, 2010
Messages
137
How can I set up a count of records in my form footer that only counts a value once.

For example.

OrderNo Code

1 Hot
1 Hot
1 Cold
2 Cold
3 Cold
4 Hot
4 Cold

I want to count the number of unique [OrderNo], the result I am after would be 4.

Then I want to count,
Code:
 orders
a. how many Hot unique orders there are = 2 
b. how many Cold unique orders there are = 4 

Is that possible in a form footer?

I only ask as we need to see the entire list of orders in the continuous form.
 
How can I set up a count of records in my form footer that only counts a value once.

For example.

OrderNo Code

1 Hot
1 Hot
1 Cold
2 Cold
3 Cold
4 Hot
4 Cold

I want to count the number of unique [OrderNo], the result I am after would be 4.
how about this?
Code:
1) create query object.  sql = "select distinct table.code from table"
2) on the control source property of the textbox in the form header:
Code:
=dcount("code", "queryNameHere")
 

Users who are viewing this thread

Back
Top Bottom