Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / November 2003

Tip: Looking for answers? Try searching our database.

macro to print report - it's blank?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tanya - 19 Nov 2003 17:14 GMT
I've created a macro to print a report based on the
current record in the form the user is currently on.I've
attached this macro to a print/command button on the form.
[PRIOR APPROVAL CONTACT INFO]![PA reference code]=[Forms]!
[PRIOR APPROVAL CONTACT INFO1]![PA reference code]
the first is the name of the table and the PA ref code is
a unique number. PA contact info1 is the name of the form.
the report prints out blank when you hit the command
button from the form but if I save the record and then go
back into it and click the print/command button the report
prints correctly with the info.
does anyone know why this will not print the current info
that the user has just entered while still in the form. I
do not want the user to save and close the form and then
go back find that record and then print.
Ken Snell - 19 Nov 2003 23:41 GMT
I'm not understanding what you have set up here.

[PRIOR APPROVAL CONTACT INFO]![PA reference code]=[Forms]!
[PRIOR APPROVAL CONTACT INFO1]![PA reference code]

The above is not a macro action.

Can you post the macro's entire step sequence?

Signature

      Ken Snell
<MS ACCESS MVP>

> I've created a macro to print a report based on the
> current record in the form the user is currently on.I've
[quoted text clipped - 11 lines]
> do not want the user to save and close the form and then
> go back find that record and then print.
Tanya - 27 Nov 2003 19:23 GMT
The statement below is the where condition for the action
openreport. I've tried doing a save action before the
openreport and it still doesn't work.
Basically I want a report to print from the current
record  and only print that one current individual's
information while the user is still on the data entry form.
Any idea's --- I am not trained in access and this is the
first one I have had to build from scratch.. One other
idea - I made the report using a wizard... will any
changes I make to a macro automatically transfer to the
already created report or do I have to re-create the
report?
Tanya - tbuelow@express-scripts.com
>-----Original Message-----
>I'm not understanding what you have set up here.
[quoted text clipped - 23 lines]
>
>.
Ken Snell - 28 Nov 2003 03:49 GMT
You haven't posted all of the macro's actions, so I will assume that you're
running an OpenReport action.

The WHERE argument for this action has this syntax:
       [FieldName_in_ReportRecordset] = "some value"

Is PA reference code the name of a field in the report's recordsource
table/query? If not, then you must use the field name that is to be filtered
for the report.

Then, if you want to use the form's control's value, use this:
       [FieldName_in_ReportRecordset] = [Forms]![PRIOR APPROVAL CONTACT
INFO1]![PA reference code]

This assumes that the name of your form is PRIOR APPROVAL CONTACT INFO1 and
the control's name is PA reference code.

By any chance, is the record in a subform?

Signature

      Ken Snell
<MS  ACCESS MVP>

> The statement below is the where condition for the action
> openreport. I've tried doing a save action before the
[quoted text clipped - 46 lines]
> >
> >.
Jim/Chris - 20 Nov 2003 13:20 GMT
Before you print the report save the record

Jim
>-----Original Message-----
>I've created a macro to print a report based on the
[quoted text clipped - 13 lines]
>go back find that record and then print.
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.