Results 1 to 2 of 2
  1. #1
    aviv is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    1

    Question Passing parameter to calculate Report title

    I'm new to access, but I'm reading alot and trying things out.

    I have a class roster report based on a query that lists the students enrolled in a particular class. I pass the class code to the query via a parameter to establish which roster. For example, when prompted I enter “12wehd” to get the list of students in that class.

    I have another query that returns course description fields from different tables that I’d like to use as the title of the above report. For example, class code field + session + Location + instructor, etc. to make up the title. I pass the same parameter to the second query as I do to the first to return those fields.

    How do I put the resulting fields together to create the different titles for each class roster? I’ve tried building an expression for a test box in the Report Header, but I keep getting error messages.

    Also, is there a way to pass the same parameter to both queries once when I run the report, without having to respond to two parameter inputs?
    Thanks in advance for any suggestions.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Query input parameter prompts are bad. Can't control validation and unless the prompt results in a new field of data (same value on each row) it cannot be referred to anywhere else.

    The report record source might need to be a query with table/query joins. Would have to know more about your data structure. Copy project, remove confidential data, run Compact & Repair, zip if large, attach to post. 2mb zip allowed. Attachment Manager is below the Advanced post editor.

    Use a form to input criteria in unbound data control (textbox, combobox, listbox). Query refers to the control as the input parameter, as long as the form remains open when query/form/report opened.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-21-2011, 03:22 PM
  2. Parameter Passing
    By Juan4412 in forum Queries
    Replies: 1
    Last Post: 11-21-2011, 10:23 AM
  3. Passing List of Parameter
    By vignes10 in forum Access
    Replies: 3
    Last Post: 09-15-2011, 07:35 AM
  4. Passing a Picture frame as a parameter
    By SacredFootballLB in forum Forms
    Replies: 1
    Last Post: 09-30-2010, 11:40 AM
  5. Macro passing a parameter
    By SlowPoke in forum Access
    Replies: 1
    Last Post: 09-26-2010, 09:57 PM

Tags for this Thread

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