Saving a open but not active forms record

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

Guest

I have a switchboard item that open two forms: Form1 and Form2. There is a
common field that links the two records together when opened. The user can
enter info into Form1 but has an option to enter info into Form2. I have a
New Record command button that creates a new record for Form1 but I need to
save the record in Form2 before adding a new record in Form 1.

I don't know the command to save a record in another form. Can someone help
me?
 
Wylie C said:
I have a switchboard item that open two forms: Form1 and Form2. There
is a common field that links the two records together when opened.
The user can enter info into Form1 but has an option to enter info
into Form2. I have a New Record command button that creates a new
record for Form1 but I need to save the record in Form2 before adding
a new record in Form 1.

I don't know the command to save a record in another form. Can
someone help me?

Here's one way:

With Forms!Form2
If .Dirty Then .Dirty = False
End With

Be aware: that will raise an error if (a) Form2 isn't open, or (b) the
current record on Form2 can' t be saved for some reason.
 
Back
Top