Data Entry Form

C

Claire

Hi all,
How does a form with data entry set to yes record records? I currently have
another form (fmA) opening up a bound data entry form (fmB) that has
defaulted values based on fmA. I would like to program buttons on fmB
depending on results of a process outside the database. One would just
cancel the record entry in the bound table, another would cancel the entry
and write a record to another table (date attempted and reason failed), and a
third would save the data onto the bound table as entered (and validated).
What code do I need to use to save and delete records? I'm unclear whether
I'm looking to cancel an entry or find it and delete it, if I need to move to
the next record in order to save the entry, or what have you.

Thanks!
~Claire
 
K

Ken Snell [MVP]

A form will save a current record when one of these events occurs:
-- you close the form
-- you move to a different record
-- you tell the form to save the data via a macro or VBA step that tells
the form to save the record

A form will not save an unsaved record that you're currently entering if
(and if you've not done any of the above actions that will save the record)
-- you press Esc key twice, or
-- you tell the form to undo the record via a macro or VBA step that
tells the form to undo its record
 
C

Claire

Thank you! Just a follow up:

What is the VBA code to save a record or to undo the record?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top