Saving/Writing data

T

tezza

I have an Enquiry table and 3 Forms that use it. The first form shows certain
info and contains a button that opens another form that shows different
information. This form also contains a button that when pressed shows some
more details. In View/Amend mode this works fine. Problem arises when user
selects the Add Enquiry button. Information entered on the second and third
forms is not saved. Is there any way of saving the data when you go from form
to form?
 
O

Ofer

Hi
You can try running the save command before openning the next form
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Or run requery on the form before you open the next one
Me.Requery
 
T

tezza

Thanks.
Changed things around a bit.
Used the...............
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 as
you suggested.

Bingo!!!
I'll remember that one.
Cheers Ofer
Tezza
 
J

John Vinson

Thanks.
Changed things around a bit.
Used the...............
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 as
you suggested.

Just for what it's worth, another way to accomplish the same end is
simpler, faster, and (unfortunately) more obscure:

If Me.Dirty Then Me.Dirty = False

forces the form's Dirty property to False by writing the data to disk.

John W. Vinson[MVP]
 
Top