I have a field called status, and on the "After Update" Event procedure, if the status = closed or iATO a separate form pops up asking for what date the system will expire.
The pop up works great, but when you go to close the main form, you get a message "The record has been modified by another user, if you save the record you will overwrite the changes the other user made." So, if I hit save, the expiration date dissapears.
What is causing the message? The expire date isn't on the main form. How can I make it so that this conflict doesn't happen?
Here's the code for the after update
And here's the code for the pop up form:
Thanks
The pop up works great, but when you go to close the main form, you get a message "The record has been modified by another user, if you save the record you will overwrite the changes the other user made." So, if I hit save, the expiration date dissapears.
What is causing the message? The expire date isn't on the main form. How can I make it so that this conflict doesn't happen?
Here's the code for the after update
Code:
Private Sub Status_AfterUpdate()
On Error GoTo errline
Select Case Me.Status
Case "Unfunded", "Cancelled"
Me.close_dt = Now()
Case "Closed"
Me.close_dt = Now()
DoCmd.OpenForm "frmExpire", acNormal, , "ID=" & Me.ID
Case "iATO"
DoCmd.OpenForm "frmExpire", acNormal, , "ID=" & Me.ID
Case Else
Me.close_dt = Null
End Select
And here's the code for the pop up form:
Code:
Private Sub Command1_Click()
If IsNull(Me.expiration) Then
MsgBox "Please enter a System Expiration Date.", vbOKOnly, "Required Data"
End If
DoCmd.Close
End Sub
Thanks