Hi All,
I have a database that is run across a server that used to work fine. Recently I added the following code to one on the data entry forms;
The form work fine if there is only one user accessing the database, but as soon another user uses the database, then tries to to save a record on the form I get the following error;
Run-Time error '2501'
The Save action was canceled.
Checking the Debug Screen highlights the line
DoCmd.Save
If I remove the above code everything works fine.
We are using MS Access 2003.
Does anybody have a clue as to what I an doing wrong here?
Thanks in advance
I have a database that is run across a server that used to work fine. Recently I added the following code to one on the data entry forms;
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Provide the user with the option to save/undo
'changes made to the record in the form
If MsgBox("Changes have been made to this record." _
& vbCrLf & vbCrLf & "Do you want to save these changes?" _
, vbYesNo, "Changes Made...") = vbYes Then
[COLOR=Yellow][b]DoCmd.Save[/b][/Color]
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub
The form work fine if there is only one user accessing the database, but as soon another user uses the database, then tries to to save a record on the form I get the following error;
Run-Time error '2501'
The Save action was canceled.
Checking the Debug Screen highlights the line
DoCmd.Save
If I remove the above code everything works fine.
We are using MS Access 2003.
Does anybody have a clue as to what I an doing wrong here?
Thanks in advance