Canceling adding a record

  • Thread starter Thread starter Dorian Chalom
  • Start date Start date
D

Dorian Chalom

I am getting back into Access please forgive me.

How do you cancel the adding of a record if you are adding a record by the
navigation button?

I hit the >* to add a record but then I decide not to and I pres the
previous button.
 
Dorian,
What you're doing (>*) is "navigating" to a New record... you really
haven't created one yet. You didn't enter any data into the New record, and
Access knows that.

So.... if you got to Previous... or First... or any other record... or
even exit the form altogether, you'll (in affect) be "cancelling" the New
Record.

Once you enter data into (and update) a new record, then it will be have
to be deleted.
hth
Al Camp
 
OK...but there a couple fields on the form that are combo boxes based off of
a Select statement and those fields are auto filled. So, How do i delete
the record, or atleast trap the primary index cannot be null and delete the
record and allow the user to go to the previous record?


Thanks for your help
 
Put some logic in the Before Update event of the form to determine whether to
add the record or not.
 
Are you assigning a Default Value or are you actually assigning a value to
the field? You should just assign a default value. If you've merely
assigned a Default Value, moving to new record doesn't create a new
record...until you start inserting data in the fields/editing.
 
If the Form has been dirtied, the user can hit Escape once or twice (the
first Escape ondoes the Active Control if required and the second Escape
undoes the Record add/edit) to cancel the addition.
 
Back
Top