Saving information when moving between forms

  • Thread starter Katherine Smith
  • Start date
K

Katherine Smith

Is it possible to move from one form to another and save the information in
the process.

For example, if I have my projects form open and add a new project the
information will be saved if I quit Access, but if I click on 'Go to Reports'
(controlled by a macro - 'Open Form'; 'Reports') and then print a report the
information is not included in the report. I assume this is because the
information is not saved while moving around within the database. If I quit
and then reopen the database and print the report the new project is included.

Hope this makes some sort of sense!
 
A

Allen Browne

You can explicitly save in whatever event you use to fire up the report.

In this example:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html
we use a command button to open the report, and we saved the record by
setting the form's Dirty property to No.

It would be possible to use the Deactivate event of the form, but that could
fire for other reasons, when it might not be a suitalbe to save (e.g. to
look up another value you need before you can save this record.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 

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