By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,829 Members | 673 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,829 IT Pros & Developers. It's quick & easy.

Stay on Current Record Without Saving

P: 22
This code works perfectly.
The only problem that I have detected is when I press enter at the last bounded field. It shows the MsgBox "Please use the Save button .."
Is there any way to prevent this from happening?
{NeoPa - Admin}
This was split away from an article How to Stop Bound Forms from Updating Automatically where it was asked in error.
Jul 20 '17 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 344
wow, been years since I was on this. Okay Simaonobrega, what you need to do is create a transparent input box, say, 'jump' and then use the tab order to make 'jump' the last entry on the form. Then, on the 'on entry' code for 'jump' use 'set focus xyx' where xyz is the 1st field. Sorry I can't post the actual code I used, but I last used this in 1998 and have long forgotten the security username and password to get into it, assuming it would still open under current version of Access. Good luck
Jul 20 '17 #2

P: 22
Lysander, thank you very much for your answer. After reading your post, I changed the order tab (after the last field I put the SaveButton) and it solved the problem.
I also added one line of code to the code given by NeoPa:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdSave_Click()
  2.     blnGood = True
  3.     Call DoCmd.RunCommand(acCmdSaveRecord)
  4.     DoCmd.GoToRecord , , acNewRec  'New Line
  5.     blnGood = False
  6. End Sub
I don't Know why but without this new line of code it the old code just saved my last entry.

Best regards
Jul 20 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.