By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,259 Members | 1,709 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,259 IT Pros & Developers. It's quick & easy.

Numbering help

P: n/a
Hi
I have little problem and need help. The problem is next:
in my query I have Manufactory_ID, Product_ID and Manufacture_Date.
i need to number the Manufacture_dates as they follow with regard to
Manufactory_ID and Product_ID.
an example
Manufactor_ID: TERRA
Product_ID: PGT
M_Date: 12/06
NUMBER:1
Manufactor_ID: TERRA
Product_ID: PGT
M_Date: 14/08
NUMBER:2...etc,
but
Manufactor_ID: TERRA
Product_ID: NINA
M_Date: 12/06
NUMBER:1
Any sugestiones about the expression solving this problem?
many thanks
J.J.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
J.J. wrote:
Hi
I have little problem and need help. The problem is next:
in my query I have Manufactory_ID, Product_ID and Manufacture_Date.
i need to number the Manufacture_dates as they follow with regard to
Manufactory_ID and Product_ID.
an example
Manufactor_ID: TERRA
Product_ID: PGT
M_Date: 12/06
NUMBER:1
Manufactor_ID: TERRA
Product_ID: PGT
M_Date: 14/08
NUMBER:2...etc,
but
Manufactor_ID: TERRA
Product_ID: NINA
M_Date: 12/06
NUMBER:1
Any sugestiones about the expression solving this problem?
many thanks
J.J.

On method is to use Dcount() to count all records wehere the mfgid is
the same as the current rec, the product id is the same, and the date is
less than the current date plus 1. Here's an example. If you have 2
records opr same mfg/product with the same date, you have a problem.

Expr1 : Dcount("AFieldInYourTableToCount","YourTableName", _
"Manufactor_ID = '" & [Manufactor_ID] & "' And " & _
"Product_ID = '" & [Product_ID] & "' And " & _
"M_Date < #" & [M_Date] & #")

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.