Results 1 to 5 of 5
  1. #1
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28

    More reporting hell for a novice


    I posted a question on here a couple of weeks ago - and I muddled my way through to find the information, count it and put it on the form in a list box.

    I now have the issue of being asked three times for the date parameters for the report - is there any way I can reduce this to being asked once?

    Thanks in advance
    Kelly

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,914
    Use Tempvar for the date
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    You should not use prompts in the queries (i.e. [Enter Start Date:]) feeding your report\subreport but add two textboxes to your form (on which you have the button to open the report) for your start and end dates then reference those in the query: Forms!frmYOUR_FORM!StartDate (where StartDate is the name of the unbound textbox control where you'll enter the start date).
    This way you will not get any prompts. Note that you will want to add some validation before attempting to open the report by checking if both textboxes have valid values.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28
    Sorry - I'm self taught and have no idea what that means?

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,792
    Are you opening the report by use of the form (e.g. there is a button on the form for this) or are you opening it from the nav pane where all the query/table/report objects might be listed? You should be using a form to do what Vlad suggests. On the form:
    - add 2 textboxes; one for FROM date and one for TO date. If on the forms property sheet, Format tab you set the Format to Date you can make use of the date picker for these 2 controls
    - your form also has a button for opening this, and I suppose any other report that might be listed on it
    - your button code should check that there is a value in each box, that the values are dates, and that FROM is not later than TO.

    Let us know when you get that far, and post the names of your date controls.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. I am in date hell
    By realpoor in forum Queries
    Replies: 3
    Last Post: 06-28-2013, 02:24 PM
  2. Quotation Mark Hell
    By shurstgbr in forum Programming
    Replies: 4
    Last Post: 06-13-2011, 06:17 AM
  3. Novice at best
    By jmorse in forum Reports
    Replies: 8
    Last Post: 04-19-2011, 03:21 PM
  4. Hyperlink hell
    By Avinit in forum Access
    Replies: 1
    Last Post: 12-12-2010, 08:29 PM
  5. Help me i'm a novice!
    By andrew99 in forum Access
    Replies: 2
    Last Post: 12-30-2009, 10:19 AM

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