Results 1 to 4 of 4
  1. #1
    Varda is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    44

    Placing responses to parameters on report

    Using Access 2010

    I have a report based on a parameter query. The parameter query has three fields with parameters, so when the user opens the report, three pop up parameter boxes appear consecutively.

    I would like to show the word typed in the parameter boxes in the header of the report. How would I do that?

    The report is opened from a command button on a form.


    Varda

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I NEVER use dynamic parameterized queries. I prefer VBA that builds filter criteria with inputs on form http://www.allenbrowne.com/ser-62.html

    Textboxes on report can refer to controls on form.

    Otherwise, construct a field in query with the dynamic parameter. Then bind textbox on report to that field.
    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.

  3. #3
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    Couldn't you just put the parameterized fields into the header? Since they must match what is typed it, the typed value will be in the header.
    An alternative would be to add a field e.g. x: [prompt], this prompt must match exactly the prompt which appears in the criteria field. Then you can add the field x to the header in the report. This would capture case differences that won't be caught in the first option above. Below is the SQL of an example, and testFN can be added to the report header. But if no records are returned, you also won't have the typed in data in the header of a report.

    SELECT [Enter a First Name] AS testFN, Customer.FirstName, Customer.LastName, Customer.City, Customer.State, Customer.ZIP
    FROM Customer
    WHERE (((Customer.FirstName)=[Enter a First Name]));

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Of course the field data will match the parameter if using = operator and a textbox in header bound to that field will show the user input.

    However, if the operator is LIKE (with wildcard) or <=, etc. that will not work
    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: 7
    Last Post: 04-12-2014, 04:26 PM
  2. Replies: 1
    Last Post: 07-25-2013, 01:20 PM
  3. Placing a notes section in a report
    By lugnutmonkey in forum Reports
    Replies: 10
    Last Post: 03-05-2013, 11:50 AM
  4. how to sum total number of responses
    By mdnikki in forum Reports
    Replies: 3
    Last Post: 02-20-2013, 03:33 PM
  5. Report from survey responses
    By Saramj in forum Reports
    Replies: 0
    Last Post: 02-20-2011, 04:59 PM

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