Results 1 to 5 of 5

Thread: Report Question

  1. #1
    Join Date
    Jun 2009
    Posts
    95

    Unanswered: Report Question

    I have a form where a user clicks a button and a report is generated. The report has various general fields about business, address, etc. "Date" is one of the fields.

    I want to add the functionality of the user being able to input a range between two dates, before one date, or after one date and the report only generates reports for that specific range.

    I have nothing right now and I was looking for suggestions on how to get started on this.

    Thanks,
    CT

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    create your form
    populate that form with whatever controls you need
    validate the any user data
    if the data is valid then enable the 'generate report(s)' button(s)
    when each report opens pull the parameters into the reprot, or use then as a filter applied to the report.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2009
    Posts
    95
    Hey healdem,

    I appreciate your response, but I am a bit of an Access "newb" and I was wondering if you could repeat what you said in a more simple way to understand.

    Thanks a lot,
    CT

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    a technique I've used in the past is to have a central form from which all reports are called
    on that form are various controls which the users can populate, often its date ranges, manufacturers, product types and so on. users are free to set wahtever values they want. I validate that before submitting it to the reports
    I use a pop up form which has a date control(s) on it so I know that the user cannot put in stupid dates
    where required I put in known good / default values

    once I know I have 'good' data in those control I treat those as parameters to the report.

    you can if you wish send thos parameters as part of the reports on open filter. Im assuming you are using a report open button. if you double clikc that you will see the code behind the button.. soemthing like docmd.openreport blah,di,blah

    one of the properties you can apply to that macro is a filter. effectively the filter is a where clause without the where

    eg
    instead of select my,column,list from mytable where acolumn=avalue

    you put the filter as
    acolumn=avalue and mydate>= #01-15-2009# and mydate<= #06-21-2009#
    or
    acolumn=avalue and mydate between (#01-15-2009#, #06-21-2009#)
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jun 2009
    Posts
    95
    How do I go about setting this up?

    I am an extreme beginner and I apologize for my lack of understanding.

    Thanks,
    CT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •