saving data on closing form

D

Delf

Please read below

thanks heaps Van.
Now on my form I have subforms how do I get them as well
to do this as for now everytime I click in a subfrm it
asks me automatically if I want to change the details. I
want it to say this only when I close the main form, not
everytime I change something on subfrm.
Tx
 
J

John Vinson

Now on my form I have subforms how do I get them as well
to do this as for now everytime I click in a subfrm it
asks me automatically if I want to change the details. I
want it to say this only when I close the main form, not
everytime I change something on subfrm.

Access saves the record on a mainform (triggering the BeforeUpdate and
AfterUpdate events) the instant you set focus to a subform. With
normal use of subforms it is ESSENTIAL that it do so - if you're going
to create a new subform record linked to the main form's recordsource
table, you must have the record in the table or you wouldn't be able
to enforce referential integrity.
 

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