SaveRecord Command Button

Anonymous
2016-03-25T14:58:01+00:00

I'm running into an issue with the SaveRecord command button on a form. I've used the Command Button wizard to create the button, thus automatically generating the following macro:

When I go to the form, enter new data and hit the "Save Record" button though, I'm getting a blank "Microsoft Access" pop-up that's not allowing me to go forward with saving the form. I've got one required field on the form (which I'm populating in my test), one auto-number field for a control number, and two fields (Date Last Modified and Time Last Modified) being driven by macros to populate the current date/time before the form updates. 

Any ideas how to get to the bottom of what's causing the blank error?

Thanks in advance.

stigmata242

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. DBG 11,611 Reputation points Volunteer Moderator
    2016-03-25T16:21:48+00:00

    Hi. Without using the button, after you entered the required data, try going to the next record to see if you get any errors. Just a thought...

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. ScottGem 68,785 Reputation points Volunteer Moderator
    2016-03-25T16:35:59+00:00

    A Save button on a bound form, is an unnecessary object. Access automatically saves a record when the record loses focus. So just going to the next or previous record or closing the form or opening another form, all those actions force the current record to commit. 

    Save buttons have use when there is additional processing to be done around the save. I rarely use Save buttons. In face, when I do, I tend to label them Submit instead of Save. 

    I know that doesn't answer your question. But the answer may be in your other macros.

    0 comments No comments
  2. Anonymous
    2016-03-25T17:30:10+00:00

    This was good thinking; there was an action placed on "after update" as opposed to "before update" which was throwing everything off, and I found it via trying to manipulate the record around the command button. Fixing that action sequence has corrected the issue. thanks theDBguy.

    0 comments No comments
  3. Anonymous
    2016-03-25T17:31:08+00:00

    Thanks Scottgem. It's more of an end user thing (for them to feel comfortable that they have saved the record) but as I noted above, the issue was tied to another macro and it appears to be working correctly now. Thanks again.

    0 comments No comments
  4. DBG 11,611 Reputation points Volunteer Moderator
    2016-03-25T20:06:21+00:00

    Hi. Congratulations! Glad to hear you got it sorted out. Good luck with your project.

    0 comments No comments