field that counts

  • Thread starter Thread starter Jack need Help
  • Start date Start date
J

Jack need Help

I hope that there is someone out there who can help me:)

I need to create a field that counts how many instances
there are based on another field and increments - then
starts over when it hits a new value.

This is in an existing query based on other tables.

Category Product Order Order1
Category Product Order Order2
Category Product(new) Order Order1

Please - any help at all!!
 
Jack need Help said:
Category Product Order Order1
Category Product Order Order2
Category Product(new) Order Order1


Try in a calculated field in the Query:

DCount("*", "your-query-name", "[Category] = '" & [Category] & "' AND [Product] = '" & [Product] & "'")

This assumes that Category and Product are text fields.
 
Thank you for your prompt reply.

I entered as you stated but I receive the message "Enter
Parameter Value" query_name.

Am I missing a step?

Thank you in advance.
-----Original Message-----
Jack need Help said:
Category Product Order Order1
Category Product Order Order2
Category Product(new) Order Order1


Try in a calculated field in the Query:

DCount("*", "your-query-name", "[Category] = '" &
[Category] & "' AND [Product] = '" & [Product] & "'")
 
Sorry - it works (I think) must have had a typo...but it
is returning a total count.
What I am looking for is a running total.

Do you now the way?
-----Original Message-----
Thank you for your prompt reply.

I entered as you stated but I receive the message "Enter
Parameter Value" query_name.

Am I missing a step?

Thank you in advance.
-----Original Message-----
Jack need Help said:
Category Product Order Order1
Category Product Order Order2
Category Product(new) Order Order1


Try in a calculated field in the Query:

DCount("*", "your-query-name", "[Category] = '" &
[Category] & "' AND [Product] = '" & [Product] & "'")
This assumes that Category and Product are text fields.

--






.
.
 
Back
Top