Saving a open but not active forms record

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

Dirk Goldgar

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.
 

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