S
Sharon Milton via AccessMonster.com
Hi there
Two of my tables in my DB are a DOCUMENT Table (1-side) and a REVISIONS
table (many-side).
I have a form that has the document name, organisation and document type
and a subform that contains the revisions for each document. The revisions
primary key is an autonumber.
I would like my date field in the revisions subform to update a current
status field in my subform and previous revisions for that document.
However, the REV_ID my not be a consecutive number to the previous record
for that document as revisions come in for many documents at any one time,
and therefore assigned the autonumber willy nilly to each revision.
I have composite keys for a primary key in the DOCUMENT side, which are my
foreign keys for the REVISIONS table.
This is what I have tried to devise so far (sorry new at this and trying to
teach myself).
Private Sub MLM_Date_AfterUpdate()
If Me.MLM_Date > Me.Previous _
And ([Revisions]![Origin] = [Transmittal]![Origin]) _
And ([Revisions]![DocRef] = [Transmittal]![DocRef]) Then
Current_Status = "CR"
Forms!Revisions.Previous.[Current_Status] = "S/S"
End If
End Sub
Thanks for any help in advance!
Two of my tables in my DB are a DOCUMENT Table (1-side) and a REVISIONS
table (many-side).
I have a form that has the document name, organisation and document type
and a subform that contains the revisions for each document. The revisions
primary key is an autonumber.
I would like my date field in the revisions subform to update a current
status field in my subform and previous revisions for that document.
However, the REV_ID my not be a consecutive number to the previous record
for that document as revisions come in for many documents at any one time,
and therefore assigned the autonumber willy nilly to each revision.
I have composite keys for a primary key in the DOCUMENT side, which are my
foreign keys for the REVISIONS table.
This is what I have tried to devise so far (sorry new at this and trying to
teach myself).
Private Sub MLM_Date_AfterUpdate()
If Me.MLM_Date > Me.Previous _
And ([Revisions]![Origin] = [Transmittal]![Origin]) _
And ([Revisions]![DocRef] = [Transmittal]![DocRef]) Then
Current_Status = "CR"
Forms!Revisions.Previous.[Current_Status] = "S/S"
End If
End Sub
Thanks for any help in advance!