Why “You can’t save the record at this time” messager

mlcktmguy
mlcktmguy used Ask the Experts™
on
A client has reported getting the “You can’t save the record at this time” message several times over the last two weeks. The user reporting this error indicates there are no other users in the application when the message is thrown.

As a developer I have gotten this message over the years.  It usually occurs when trying to save when all the validations required on the record are not fulfilled. Are there other reasons this can occur?  

Background:
I developed the application that is generating the message over 12 years ago.  Up until last week they hadn’t encountered that message.  There have been no application changes in at least two years.  

Setup: Each user has a copy of the frontend ‘TravProc.mdb’ on their local machine.  The backend ‘TravData.mdb’ is stored on the server.  All front end mdb’s are linked to the backend mdb.

Prior to receiving the message last week, they had reported receiving an “Unrecognized database format’ error on the backend mdb ‘TravData.mdb”.  To handle that situation I created a new blank MDB and imported the entire backend MDB.  I then renamed the old backend, replacing it with the new rebuilt backend mdb.  

The rebuild stopped the message for a couple days but now the “can’t save the record’ message is re-occurring.  The “unrecognized database” message has not re-occurred.
Seems odd that after 12 years they are encountering this message making it unable to save changes they are making.

Over the years I developed and installed have 5 other Access for this client.  All with the same model, front mdb, backend mdb.  All users have a local copy of the front end mdb that is linked to the backend mdb on the server.  None of the other 5 applications are having any issues.

Any ideas why this long running, up until now, stable application is encountering this message?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Eduard GherguArchitect - Coder - Mentor

Commented:
Hi,
Any updates from Microsoft were installed on the client or server machines?
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:
Could be a hanging lock file (.ldb file). To check that, have all users log out of the system and check the folder hosting the backend. You should not see any files with that extension. If you do, delete the file (sometimes you have to reboot the machine to do that).

Also, are all users running the same version of Access? We've seen reports of oddball behavior like this if you have mixed versions of Access, especially newer versions.
President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012
Commented:
A client has reported getting the “You can’t save the record at this time” message several times over the last two weeks. The user reporting this error indicates there are no other users in the application when the message is thrown.

  The other thing this can be, especially in a long standing app is just a logic bug that's always been there. With Access being event driven, it's possible to have code that executes on one machine OK, but then fails when it gets moved to a faster or slower machine.  Doesn't happen as much as it used to because everything is so fast in today's world, but it still can happen.

  For example, you'll often find references to controls in the OnOpen event because it can be cancelled where as the OnLoad is not.   But controls are still being created in the background by Access and may or may not exist at the point your code executes  (controls are not guaranteed to exist until the OnLoad event).

 On one machine this may execute OK and on another you might get an error.  The fix is to issue a Me.Repaint in the OnOpen event.

  Other situations exist like this where the timing of events can change from machine to machine.

Jim.

Author

Commented:
Thanks Jim.
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
A good way to track that down btw is to put debug.print statements at the beginning/end of each even.

You can log these to a table if need be (write a procedure to log the event, then call it).   When the error occurs, it's then easy to see the pattern that occurs.

 Also another gotcha is that the main form's record on a main/subform is automatically saved when you enter a sub form control.  If you are doing validation on the main record and cancel, that can trip you up.

Jim.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial