ZJubias-
If you are using an AutoNumber field to generate RegID, then the number gets
"used up" as soon as someone starts typing in a new record - even if they
don't save it.
You can use the Form Before Update event to catch each record just before it
gets saved and verify that it is complete. You can also prompt the user to
ask if they want to save. If you need to kill the save, set Cancel = True
and tell the user to press Esc to clear edits before closing the form.
You can also provide a Cancel button that does this:
Private Sub cmdCancel_Click()
If Me.Dirty Then Me.Undo
DoCmd.Close acForm, Me.Name
End Sub
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of ZJUbias
Sent: Saturday, May 25, 2013 12:23 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] HELP - Auto Save Bound Form
Hello pro's,
I need help to control the auto-save of the bound form. Today some of the
new employees did unknowingly mistake to my registration database.
What was happened, open the database, put some data in the data entry form
after filling some controls, they decided to close the form, then again it
comes the other new, open again, then close again..
Then it comes the real data entry they noticed that the serialized RegID is
not in sequence from the last ID they got, they asked me what was happened
with the database, and I was not aware too.
Please someone feed me how to get rid of this auto-save, am not good in code
yet, so if you can give me or direct me where I can find a demo that would
be a nice start. I need to have a button of my form such; Add, Save, Cancel,
Close..
Thank you in advance,
Zjubias
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (38) |
Tidak ada komentar:
Posting Komentar