New entry at top of form

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
 
P

Paul Overway

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.
 
P

Paul Overway

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.
 
D

Dirk Goldgar

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.
 

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