Results 1 to 9 of 9
  1. #1
    geotrouvetout67 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    108

    Passing on click value from a report to dialog box opening another report based on a select query?

    I have a report based on a select query which requires entering a filter on a dialog box prompt (item ID to display open orders for the item).

    I would like to call that report from another report, on click, and pass the clicked value (item ID) to the dialog box instead of having to type it.



    Is there a way? Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Report in PrintPreview cannot be interactive, which means left clicks won't work.

    A report in ReportView is clickable.

    What do you mean by dialog box - InputBox() function?
    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
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    geotrouvetout67 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    108
    The report is in report view. The dialog box coming from the query criteria so when I call the report it's popping that dialog box.

  5. #5
    geotrouvetout67 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    108
    Quote Originally Posted by pbaldy View Post
    I tried that but it's not passing the field value to the dialog box

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It would be used instead of a parameter in the query. Few of us use bracketed query criteria; you have little control.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    geotrouvetout67 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    108
    Quote Originally Posted by pbaldy View Post
    It would be used instead of a parameter in the query. Few of us use bracketed query criteria; you have little control.
    I tried it as well and that did not work either...but, I just found out what was wrong with it.

    In my query I added nicknames to the fields such as Nickname:[fieldName]. Removing the nickname on the item ID field I was calling fixed the problem so it works now.

    Thanks for your help.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Agree with Paul. Advise not to use dynamic popup input parameter in query since input cannot be validated. I never use dynamic pararmeters in query and prefer the VBA method.

    If you must use dynamic parameter, then reference a control on form (or in this case, report) for user input. Example:

    SELECT Rates.RateID, Rates.RateLevel FROM Rates WHERE (((Rates.RateID)=[Reports]![Rates]![RateID]));
    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.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by geotrouvetout67 View Post
    In my query I added nicknames to the fields such as Nickname:[fieldName]. Removing the nickname on the item ID field I was calling fixed the problem so it works now.

    Thanks for your help.
    Happy to help. I would expect it to have worked using the alias (nickname) in the code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 09-03-2015, 06:01 PM
  2. Replies: 6
    Last Post: 04-11-2014, 05:51 AM
  3. Replies: 2
    Last Post: 02-20-2014, 09:53 AM
  4. Replies: 1
    Last Post: 05-27-2013, 08:54 AM
  5. Replies: 1
    Last Post: 10-20-2011, 01:34 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