Results 1 to 5 of 5
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    unbound subreport with its own bound subreports throw an "enter parameter value" (error)

    I have a report (srptFixtureSchedule_text) with (2) subreports (srptAddlMfrs and srptInstallNotes); they are linked by the common field txtType (or otherwise stated in their queries as: Reports![srptFixtureSchedule_text].[txtType]

    the report displays properly with no errors
    (I should also point out that the subreports may have no records related records in which case, they do not display at all (for that record) - this may be of no relevance, but I though ti ought to at least mention it...

    the problem is:
    when I create a BLANK new report: rptFixtureSchedule_shell with srptFixtureSchedule_text as an UNBOUND subreport, I get prompted for report parameters: Reports!rptFixtureSchedule_text.txtType


    clicking thru the prompts eventually get thru to the report; however, the subreports (srptAddlMfrs and srptInstallNotes) are not displayed (?!)

    ?HUH?
    I don't get it...

    any suggestion will be greatly appreciated in advance,
    Mark

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    (or otherwise stated in their queries as: Reports![srptFixtureSchedule_text].[txtType]
    The parameters/criteria to pull selective data from table(s) should be passed using forms and not report.
    when I create a BLANK new report: rptFixtureSchedule_shell with srptFixtureSchedule_text as an UNBOUND subreport
    Typically, some fields in report may be unbound and values assigned dynamically but generally, reports are based on some query or table.
    The parameter pops up because the report rptFixtureSchedule_text is inside the report rptFixtureSchedule_shell.
    Try
    Code:
    Reports!rptFixtureSchedule_shell!srptFixtureSchedule_text.Report.txtType
    In this case the, syntax to refer to the control on sub-report will be different. See more for syntax http://access.mvps.org/access/forms/frm0031.htm
    The link refers to sub-forms.

  3. #3
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496
    about " parameters/criteria to pull selective data from table(s) should be passed using forms and not report.using forms not report."
    not certain where I'm wrong ( I might indeed be doing the right thing, but stating it incorrectly (?) ); where the "query" exists is in the data property of the report (?) But for now, that doesn't seem to be the problem (?)

    but going on...
    your suggestion to change the parameter to: Reports!rptFixtureSchedule_shell!srptFixtureSchedu le_text.Report.txtType
    worked in that the subreports now displays exactly correct;
    however, now the (textbox) controls in the detail section of the report (which is where the subreports are...), which previously displayed correctly are now empty
    (their values are strings that are compiled in VBA and the assigned to the text boxes)

    regardless...
    by changing the paremeter, the very problem that I was hoping to deal with returns:

    the contents of srtFixtureSchedule_text have a not insignificant amount of code behind them, and we have a need for several different "print formats" (for the most part, different versions of footers, headers, and margins) (the report fits into documents "by others", and it is important for the overall "look" of my document to match theirs....

    I was hoping to create a library of "shells" (that would deal with the page formatting issues), and insert to "text" into them;
    but because each shell would have a different name, the reference would have to keep changing -which seems like it will be "awkward", and probably ... problematic (?)
    I could address the formatting, but there really are to many variations for it to remain clean....

  4. #4
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    A report throws an "enter parameter value" pop up generally when
    1. there is a control on report ( including subreport controls) whose control source is set to a field from underlying table/query or a VBA function but that field/function does not exist ( deleted/misspelled)
    2. The query has its criteria from a Form and that form is not open at that moment

    I am confused in your case as what is happening and what do you need. Sorry friend, I give up. May be someone else be able to help you.

  5. #5
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496
    I'm starting to think that I need to "rethink" my approach

    the problem is:
    we have a need for virtually the same report but with several (many) different "print formats" (for the most part, different versions of footers, headers, and margins) (our report fits into documents "by others", and it is important for the overall "look" of ours to match theirs....)

    what I'm hoping to do is:
    create a library of report "shells" (that would deal with the page formatting issues: headers, footers, <etc.> ), and insert the report "text" (the detail section) as a subreport into them;
    but because each report,s shell (FixtureSchedule_Shell) would have a different name, the reference (from the subreport, FixtureSchedule_Text) would have to keep changing -which seems like it will be "awkward", and probably ... problematic (?)

    Thru code, I could address the formatting is a single report, but there really are to many variations for it to remain clean....

    UGH.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 07-15-2014, 05:56 PM
  2. Replies: 6
    Last Post: 06-17-2013, 10:43 PM
  3. Replies: 1
    Last Post: 08-02-2011, 07:21 AM
  4. Replies: 7
    Last Post: 01-23-2011, 12:32 PM
  5. Replies: 4
    Last Post: 01-06-2011, 10:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums