Updating a table from a form before saving or exiting form

  • Thread starter Thread starter Joanne
  • Start date Start date
J

Joanne

I have a form with a subform. The subform has "must fill" fields.

What I need to do is one of the following:
Be able to send the main form's data to another table
Be able to send all data filled out to the point of exiting form/subform to
another table (or tables)
Be able to save the main form's data and leave the form without updating
the subform data.

I don't know if this makes sense, but can anyone help me. All formulas that
I have in the form are filled in with modules.


Thanks,
Joanne

(e-mail address removed)
remove removethis to reply by email
 
Never mind. I answered my own question. I put a DoCmd.save on the after
update for each field I needed saved. It works even if I exit without
entering data in the sub-form.

-Joanne
 
Never mind. I answered my own question. I put a DoCmd.save on the after
update for each field I needed saved. It works even if I exit without
entering data in the sub-form.

DoCmd.Save actually saves DESIGN CHANGES to the form - not what you
want!

It's obscure, but

DoCmd.RunCommand acCmdSaveRecord

or

If Me.Dirty = True Then Me.Dirty = False

are two ways to save the currently active record.
 
Thanks. Made the changes!
-Joanne

John Vinson said:
DoCmd.Save actually saves DESIGN CHANGES to the form - not what you
want!

It's obscure, but

DoCmd.RunCommand acCmdSaveRecord

or

If Me.Dirty = True Then Me.Dirty = False

are two ways to save the currently active record.
 
DoCmd.Save actually saves DESIGN CHANGES to the form - not what you
want!

It's obscure, but

DoCmd.RunCommand acCmdSaveRecord

or

If Me.Dirty = True Then Me.Dirty = False

are two ways to save the currently active record.

Just wondering, but what happens if the test is omitted and the
statement is just
Me.dirty = false
 
Back
Top