473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Stay on Current Record Without Saving

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
2 1868
Lysander
344 Expert 100+
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
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

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

Similar topics

3
by: hebandgene | last post by:
When I delete a record in a subform I get the warning that I'm about to delete a record, followed by an error "No current record." When I click OK obviously the record is deleted and it goes to...
1
by: moelleni | last post by:
Hi, I made an Access 2002 Database and wanted to automate it to sent the current record to Word 2002. So readed the article "How to send the current record to Word 2000 with automation" I tried...
0
by: 2D Rick | last post by:
I input data into two textboxes on Form1 which returns three records into Form2. I then Print record 2of3 using criteria from Form2. stLinkCriteria = "= '" & Forms!! & "'" & " AND = '" &...
1
by: Reginald Bal | last post by:
Main Form/SubForm When I requery or recalc my parent form after I updated a record in my subform, I lose the focus of that particular record in my subform. Instead, the first record is selected....
3
AccessIdiot
by: AccessIdiot | last post by:
Please see attached screen shot. As you can see I have a main form (DPR_Main) with a subform (DPR_Survey). Within the subform is another subform (DPR_Resources). I am using the following code I...
3
by: Nancy Connoyer | last post by:
I have a command button on a simple form created with the wizard. When adding a new record and the clicking save it does not stay on the current record. I have also tried an event procedure with...
5
by: Redbeard | last post by:
I am working with Access 2007. I am trying to print a report from the current record on a Subform. My form is comprised of a Main form with a sub-form and another sub-form with in the sub-form. ...
5
by: DPRapson | last post by:
Hi All, The code listed below does what it should. It checks for existing records in 2 fields an then allows for 3 options: 1. Yes - Existing found, add duplicate (2 John Smiths) 2. No - Open...
3
Dpot
by: Dpot | last post by:
So I have this code below to print to PDF: With DoCmd .Save .RefreshRecord End With Dim SfPath As String SfPath = "\\usfoxsrvfil096\NFDQE\NCR PDF\" & "NCR " & Format(Me.ID) & ".pdf" Dim...
6
by: rod4 | last post by:
hello guys, i have made a button in a form (access 2007) for saving a record, the record will be only saved with this button with this command in the buttons onclick event... DoCmd.RunCommand...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.