B
Bruce
I could use some help on VB code.
I am developing a data base to track the development of
technical manuals for various projects. These manuals
have 18 checkpoints to go through by 5 different
departments. What I am trying to do is automate some of
the functions in the data base. I am using a form to
display the schedule for the technical manuals and one of
the features I want to automate is the responsible party
field(see AMSEC in example). Using the "on Current event"
on the form the responsible party field should be
populated based on the last the open checkpoint. The
problem I am having is that the code (seen below) works up
to a point. But once I test the code for steps 6 and 7
the "O51" in the "Responsible_party" field will remain no
matter what other checkpoints are satisfied. As a note
this code starts from the last check point and cycles to
the earliest checkpoint. A screen print of the schedule
form is included as a reference. (screen print did not
copy)
Private Sub Form_Current()
(1) If txtamsecFinalcompAct > 1 Then
txtResponsible_Party = ""
Else
txtResponsible_Party = "AMSEC"
End If
(2) If SOStechappAct > 1 Then
txtResponsible_Party = "AMSEC"
Else
txtResponsible_Party = "SOS"
End If
(3) If AmsecSubmitSOSact > 1 Then
txtResponsible_Party = "SOS"
Else
txtResponsible_Party = "AMSEC"
End If
(4) If EngFinalCompAct > 1 Then
txtResponsible_Party = "AMSEC"
Else
txtResponsible_Party = LEAD_DEPT
End If
(5) If AMSECPrepFinalEngReviewACT > 1 Then
txtResponsible_Party = LEAD_DEPT
Else
txtResponsible_Party = "AMSEC"
End If
(6) If O51SubmitAMSECAct > 1 Then
txtResponsible_Party = "AMSEC"
Else
'txtResponsible_Party = "O51"
End If
If txtAmsec_submit_VendorAct >1 then
txtResponsible_party = "O51"
Else
txtResponsible_party = "AMSEC"
end if
End Sub
I am developing a data base to track the development of
technical manuals for various projects. These manuals
have 18 checkpoints to go through by 5 different
departments. What I am trying to do is automate some of
the functions in the data base. I am using a form to
display the schedule for the technical manuals and one of
the features I want to automate is the responsible party
field(see AMSEC in example). Using the "on Current event"
on the form the responsible party field should be
populated based on the last the open checkpoint. The
problem I am having is that the code (seen below) works up
to a point. But once I test the code for steps 6 and 7
the "O51" in the "Responsible_party" field will remain no
matter what other checkpoints are satisfied. As a note
this code starts from the last check point and cycles to
the earliest checkpoint. A screen print of the schedule
form is included as a reference. (screen print did not
copy)
Private Sub Form_Current()
(1) If txtamsecFinalcompAct > 1 Then
txtResponsible_Party = ""
Else
txtResponsible_Party = "AMSEC"
End If
(2) If SOStechappAct > 1 Then
txtResponsible_Party = "AMSEC"
Else
txtResponsible_Party = "SOS"
End If
(3) If AmsecSubmitSOSact > 1 Then
txtResponsible_Party = "SOS"
Else
txtResponsible_Party = "AMSEC"
End If
(4) If EngFinalCompAct > 1 Then
txtResponsible_Party = "AMSEC"
Else
txtResponsible_Party = LEAD_DEPT
End If
(5) If AMSECPrepFinalEngReviewACT > 1 Then
txtResponsible_Party = LEAD_DEPT
Else
txtResponsible_Party = "AMSEC"
End If
(6) If O51SubmitAMSECAct > 1 Then
txtResponsible_Party = "AMSEC"
Else
'txtResponsible_Party = "O51"
End If
If txtAmsec_submit_VendorAct >1 then
txtResponsible_party = "O51"
Else
txtResponsible_party = "AMSEC"
end if
End Sub