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 / Reports / Printing / October 2004

Tip: Looking for answers? Try searching our database.

Sub-report filter question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ynot - 08 Oct 2004 17:29 GMT
I have a report with a subreport.  I am printing it via a button and code
from a form with a subform.  I am trying to print one page with the same
information that is on the screen in the form/subform combination.  I have
tried several solution posted here and can't seem to get them to work.  The
report works fine, selecting the correct subreport is the problem  Here is
one example solution I tried: Try this:Base the subreport on a stored query
that uses the user form to get it'scriteria:select * from tblSubDataTable
where Active=Forms!frmUserForm!booCheckbox When the report is started it
pops up a dialog box asking for the parameter.  It is not taking it from the
form, which is still active.  If I key in the correct parameter, the
report/subreport prints correctly.  What am I doing wrong????An example, I
want to print report "job1" subreport "Work  order 3".   As I said the
report works fine, the subreport is what I have to select correctly

Job 1

    Job 1 - Work order 1

    Job 1 - Work order 2

    Job 1 - Work order 3

    Job 1 - Work order 4

Job 2

    Job 2 - Work order 1

    Job 2 - Work order 2

    Job 2 - Work order 3

    Job 2 - Work order 4
Marshall Barton - 08 Oct 2004 18:17 GMT
>I have a report with a subreport.  I am printing it via a button and code
>from a form with a subform.  I am trying to print one page with the same
[quoted text clipped - 9 lines]
>want to print report "job1" subreport "Work  order 3".   As I said the
>report works fine, the subreport is what I have to select correctly

When you get a pop-up prompt, it means that you did not
specify the parameter corrrectly.  In this case, it looks
like you may have misspelled the form's or combo box's name.
Or maybe the parameter is in the subform and the parameter
says it's on the main form??

Signature

Marsh
MVP [MS Access]

Ynot - 11 Oct 2004 00:02 GMT
I triple checked for that and it is typed correctly.  Would I address it
differently because it is an open subform of an open form?

>>I have a report with a subreport.  I am printing it via a button and code
>>from a form with a subform.  I am trying to print one page with the same
[quoted text clipped - 18 lines]
> Or maybe the parameter is in the subform and the parameter
> says it's on the main form??
Marshall Barton - 11 Oct 2004 05:42 GMT
>I triple checked for that and it is typed correctly.  Would I address it
>differently because it is an open subform of an open form?

If it's on a subform, then you have to provide the full
reference to the subform control:

Forms!mainform.subformcontrol.Form.controlonsubform
Signature

Marsh
MVP [MS Access]

>>>I have a report with a subreport.  I am printing it via a button and code
>>>from a form with a subform.  I am trying to print one page with the same
[quoted text clipped - 18 lines]
>> Or maybe the parameter is in the subform and the parameter
>> says it's on the main form??
Ynot - 11 Oct 2004 17:40 GMT
Marshal.   THANX..............

That did it!

>>I triple checked for that and it is typed correctly.  Would I address it
>>differently because it is an open subform of an open form?
[quoted text clipped - 30 lines]
>>> Or maybe the parameter is in the subform and the parameter
>>> says it's on the main form??
 
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.