C
Christopher Glaeser
When a customer approves a workorder, the code below is used to create an
approval record for that workorder. The code first checks to determine if
the appoval record for the workorder already exists, and if not, creates a
new approval record for that workorder.
If IsNull(DLookup("[intApprovalID]", "tblApprovals", "[intWorkOrderId] =
" & Me.WorkOrderID)) Then
CreateApproval Me.WorkOrderID
Else
DoCmd.OpenForm "frmApproval", , , "[intWorkOrderID]=" &
Me.WorkOrderID
End If
This code is pretty close to working, but does not check to see if
frmApproval is already open for an unrelated workorder, in which case this
code overwrites an unrelated approval record with information from the new
workorder approval. Suggestions for correcting this code fragment are much
appreciated.
Best,
Christopher
approval record for that workorder. The code first checks to determine if
the appoval record for the workorder already exists, and if not, creates a
new approval record for that workorder.
If IsNull(DLookup("[intApprovalID]", "tblApprovals", "[intWorkOrderId] =
" & Me.WorkOrderID)) Then
CreateApproval Me.WorkOrderID
Else
DoCmd.OpenForm "frmApproval", , , "[intWorkOrderID]=" &
Me.WorkOrderID
End If
This code is pretty close to working, but does not check to see if
frmApproval is already open for an unrelated workorder, in which case this
code overwrites an unrelated approval record with information from the new
workorder approval. Suggestions for correcting this code fragment are much
appreciated.
Best,
Christopher