Update Part Rev Field

You could just un-approve the old revision.

We found that with multiple revisions approved MRP was driving too much
material (Probably the way we loaded our sales orders)

But we only have one revision of a part approved at a time.





Mark Taylor
Senior Document Controller

Hansatech EMS provides value manufacturing through engineering and
quality

________________________________


Hansatech EMS Limited
Benson Road
Nuffield Industrial Estate
Poole
Dorset BH17 0RY
United Kingdom

Tel:
Fax:
DDI:

+44 (0)1202 338200
+44 (0)1202 338202
+44 (0)1202 338228

Mark.Taylor@...
www.HansatechEMS.com





[Non-text portions of this message have been removed]
I want to make sure the latest revision is always used on a Manufatured Part on the Sales Order Line. So a part has 2 revs, A and B, A's effective date is older than B's, make sure B is selected. As a test I put a Order Line in and use select Rev A. I setup a button for now to test when I click the button this code works except when I click Save it reverts back to Rev A.

Dim tempdate as Date = "01/01/01"
Dim rev as String = ""

For each olDR As DataRow in edvOrderDtl.dataView.Table.Rows
for each revDR as DataRow in edvPartRev.dataview.Table.Rows
If revDR("Approved") = TRUE then
If revDR("EffectiveDate") > tempdate then
tempdate = revDr("EffectiveDate")
rev = revDR("RevisionNum")
End If
End If
next
next
edvOrderDtl.dataView(edvOrderDtl.Row)("RevisionNum") = rev

Scott