New entry at top of form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My user would like to add a new record to a continuous form at the TOP of the
form.

I understand this can't be done, so I created a separate form above it for
new records only. (allows add records, not deletes or edits). It works fine,
except that when a record is saved, it then appears in both the "new entry"
form AND the "edit form" below. How do I change this so that after the
record is saved the "new entry" form is blank blank again?

Thank you.
Meryl
 
Make all the controls unbound for that portion of the form (I'm assuming the
form header in the continuous form ?). After you've successfully written
the new record, clear each of the controls.
 
Programmatically.

i.e., (Air Code)

Docmd.GoToRecord ,,acNewRec
Me.SomeField = Me.SomeControl
etc.
Me.Dirty = False
Docmd.GoToRecord ,,acFirst

Or you could use the form's recordsetclone, add the record to it, clear the
controls, and then requery the form.
 
Meryl said:
My user would like to add a new record to a continuous form at the
TOP of the form.

I understand this can't be done, so I created a separate form above
it for new records only. (allows add records, not deletes or edits).
It works fine, except that when a record is saved, it then appears in
both the "new entry" form AND the "edit form" below. How do I change
this so that after the record is saved the "new entry" form is blank
blank again?

Thank you.
Meryl

An alternative to the unbound-control approach suggested by Paul Overway
is to have two bound subforms on an unbound main form, and make the top
subform be in Data Entry mode. Also, in the AfterInsert event of that
subform, requery the other subform.
 
Back
Top