Error in User, no error in Admin

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a user here in the office that is getting an error when he clicks on a
command button I set up to close the form and it points to the code I wrote
for the button. I went in and pulled up the same form and it works fine. I
even tried it in another user with the same rights "Read-Only". Has anyone
ever come across this?
 
"Run-time error 2046. The command or action 'SaveRecord' isn't available now."

It gives you the option to End or DeBug. If I click "DeBug" It opens the
visual basic code screen and highlights "DoCmd.RunCommand acCmdSaveRecord".
 
Does the user have the ability to update records in the database otherwise?
It's possible that he doesn't have the correct permissions to the folder
where the MDB file exists, so that he's only got read-only access.
 
No, he is set up as read-only. I really don't want him set up as anything
but read-only. Is this a problem?
 
It he's read-only, what are you expecting the SaveRecord to accomplish?
SaveRecord implies update...
 
Because two of us update the records and it is needed in the code when we
enter and edit data.
 
Realistically, there's probably no reason for the SaveRecord: Access is
supposed to automatically save changes for you (although there are a few
cases where it gets confused)

What you can try is to only save if the record needs to be saved:

If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord"
End if
 
Back
Top