Results 1 to 11 of 11
  1. #1
    ExHell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    4

    Report: Parameter dates prompted twice for Data and Chart in same report

    Hi all,



    Thanks in advance for any help you can provide.

    I'm currently building a database to store a number of characteristics of machines at my work and am having trouble with a report. I am recording the downtime of each machine along with the frequency of stoppages and want to display this data on a report along with a chart of it. I have the machines grouped in four different sections, with 3 reports generated for each section. These reports are the Top 5 weekly issues, Top 5 monthly issues and then Top 5 over a user defined period of time. Everything works fine, except for the final report with parameter inputs. The user is asked for the date, but is prompted twice, once for the data displayed on the report, and once for the chart displayed on the same report.

    If two different periods of time are entered for each of the two prompts, the first date range is displayed in the data, and the second data range is displayed on the chart.

    This problem is really doing my head in and I can't figure out how to link the chart and the data so the dates only have to be entered in once before displaying the required results on the report.

    If anyone could sched some light on this problem, that'd be great.

    Thanks,
    James

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Most of us would have the user enter the dates on a form and have the queries get them from there.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ExHell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    4
    So how exactly do I get it to work the same when using a form?

    Thanks.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Textbox on form, parameter in query (report RecordSource and chart RowSource) references the textbox, like:

    Forms!formname!textboxname
    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.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Replace bracketed criteria like

    [Enter date]

    with

    Forms!FormName.TextboxName
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    ExHell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    4
    So I put: Forms!FormName.TextboxName in the criteria cell in the date column of the query, and then link this to the form where the data will be put in? For some reason I can't enter the date into the form, it just draws it from the query. Not sure what I've done wrong?


    Thanks for your help.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    All controls used to input filter criteria must be UNBOUND.

    Assume you used your form name and textbox name in place of the generic example.
    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.

  8. #8
    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 June7 View Post
    All controls used to input filter criteria must be UNBOUND.
    Why would you say that? It certainly hasn't been my experience. I occasionally use a criteria form bound to a front end table when the users want their criteria inputs to be "remembered". You certainly wouldn't want it bound to a transaction table, but for a criteria form it's fine.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    That is a use I've never thought of, but of course I meant, by inference, not bound to field of 'transaction' table, which it sounds like the OP has done.
    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.

  10. #10
    ExHell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    4
    Thanks guys, I struggle through it but eventually figured it out thanks to your help.

    Regards,
    James

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem James.
    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. Chart is not showing up on the report.
    By Guntar in forum Programming
    Replies: 1
    Last Post: 12-19-2012, 03:11 PM
  2. Replies: 4
    Last Post: 05-17-2012, 12:28 AM
  3. Adding a chart to a report
    By Bigmix in forum Reports
    Replies: 7
    Last Post: 02-14-2012, 08:47 AM
  4. Pie Chart Design for Report
    By maggioant in forum Reports
    Replies: 0
    Last Post: 10-13-2009, 03:06 PM
  5. Replies: 6
    Last Post: 02-20-2009, 11:50 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