confirm changes on main and subform

  • Thread starter sobeit via AccessMonster.com
  • Start date
S

sobeit via AccessMonster.com

ive created a code on beforeupdate event on my mainform to confirm any
changes made

and also in the subform but my problem is a confirmation keeps on popping on
every add of record on my continous form subform

how can i make it right to only confirm when you finish adding records on
subform or leaving only on that main form
 
A

Allen Browne

You cannot do that.

Access saves each record as entered. As you move from row-to-row in the
subform, each one is saved. Even if you move from subform back to main form
(or vice versa), the record is saved.

There is no simple way to change that behavior with bound forms. It is
possible to put the records into temporary tables, and only add them to the
real tables when you click a 'Commit' button. However that's fraught with
difficulties. Particularly when editing records in a multi-user environment,
it gets very messy to maintain concurrency.

In Access 2000 and later, it is possible to bind a form to a recordset that
exists within a transaction that can be rolled back. But this approach
doesn't work for subforms either, since Access reloads the subform each time
you move record in the main form.
 
S

sobeit via AccessMonster.com

thanks mr allen...n i k

Allen said:
You cannot do that.

Access saves each record as entered. As you move from row-to-row in the
subform, each one is saved. Even if you move from subform back to main form
(or vice versa), the record is saved.

There is no simple way to change that behavior with bound forms. It is
possible to put the records into temporary tables, and only add them to the
real tables when you click a 'Commit' button. However that's fraught with
difficulties. Particularly when editing records in a multi-user environment,
it gets very messy to maintain concurrency.

In Access 2000 and later, it is possible to bind a form to a recordset that
exists within a transaction that can be rolled back. But this approach
doesn't work for subforms either, since Access reloads the subform each time
you move record in the main form.
ive created a code on beforeupdate event on my mainform to confirm any
changes made
[quoted text clipped - 5 lines]
how can i make it right to only confirm when you finish adding records on
subform or leaving only on that main form
 

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