Print report from form doesn't show current data

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

How do I print a report after the data is entered into a form?

Currently, I have a command button running off a macro that saves the
record, but when I print the report its blank. If i go out of the form and
back in I can print. What do I need to put in my macro to make it save and
then print?

My macro is set up this way:
Set Warnings - no
Save - form
OpenReport - where the formid = id
 
The Save action in a form does not save the data in the form; its focus is
to save the design of a ofrm or other object. So it's not actually saving
your data, hence the report cannot see the data in the table.

Change the Save action to this:

RunCommand
Command: SaveRecord


Alternatively, this also should work:

SetValue
Item: Forms!NameOfYourForm.Dirty
Expression: False
 
The Save action in a form does not save the data in the form; its focus is
to save the design of a ofrm or other object. So it's not actually saving
your data, hence the report cannot see the data in the table.

Change the Save action to this:

RunCommand
Command: SaveRecord


Alternatively, this also should work:

SetValue
Item: Forms!NameOfYourForm.Dirty
Expression: False
 
Perfect. Thank you Ken!!!

Ken Snell said:
The Save action in a form does not save the data in the form; its focus is
to save the design of a ofrm or other object. So it's not actually saving
your data, hence the report cannot see the data in the table.

Change the Save action to this:

RunCommand
Command: SaveRecord


Alternatively, this also should work:

SetValue
Item: Forms!NameOfYourForm.Dirty
Expression: False

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/
 
Perfect. Thank you Ken!!!

Ken Snell said:
The Save action in a form does not save the data in the form; its focus is
to save the design of a ofrm or other object. So it's not actually saving
your data, hence the report cannot see the data in the table.

Change the Save action to this:

RunCommand
Command: SaveRecord


Alternatively, this also should work:

SetValue
Item: Forms!NameOfYourForm.Dirty
Expression: False

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/
 
Back
Top