Print out not updated

A

Amour

Hi I am new to Access and I have this problem that occurs when the user
pressess the print button.

I have a form were the print button is pressed. If the user updates that
form and then clicks on the print button the old information is printed. If
the user updates the form closes it and then reopens it then that new info is
printed. I know that the printout looks at the table (query) and not the
form.

What I want is for this not to happen.

How do I fix this problem

Thank You for any help on this matter
 
L

Larry Linson

Is the Form bound to data that will be printed on the report, and is it that
data that you are changing? If so, that data will not be saved to the
underlying tables until: the user moves to a different record in the Form's
RecordSource, the Form is Closed (as you describe), you move the cursor to a
Subform Control on the Form (if any), or you take specific action to save
the Record.

My guess is that none of the above have happened... thus, the information is
changed in the Text Boxes on the Form, but not in the Tables that are
accessed in the RecordSource of the Report.

If you look at the code generated by the Print Button Wizard, you'll find a
statement

DoCmd.OpenReport.

If, before that statement, you'll insert a statement:

Me.Dirty = False

That will likely be the simplest way for you to assure the Record is saved
before the Report is executed.

Larry Linson
Microsoft Access MVP
 

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