L
Little Penny
I have a form called computers that sets on top of a query of the Computers and UserInfo tables. The Users table has a one to many relationship with
the computers table which is joined by the UserID field. The form works great but I wanted to put a before update event to confirm when changes are me
I use the VB code
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not Me.NewRecord Then
If MsgBox("Changes have been made to this record" _
& vbCrLf & "Do you want to save these changes?" _
, vbYesNo + vbDefaultButton2, "Changes Made...") = vbYes Then
DoCmd.RunCommand acCmdSaveRecord
End If
End If
End Sub
When I click No it works fine all changes go back to there original value but when I click yes I get "Run-time error 2115
Thanks
the computers table which is joined by the UserID field. The form works great but I wanted to put a before update event to confirm when changes are me
I use the VB code
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not Me.NewRecord Then
If MsgBox("Changes have been made to this record" _
& vbCrLf & "Do you want to save these changes?" _
, vbYesNo + vbDefaultButton2, "Changes Made...") = vbYes Then
DoCmd.RunCommand acCmdSaveRecord
End If
End If
End Sub
When I click No it works fine all changes go back to there original value but when I click yes I get "Run-time error 2115
Thanks