Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Date Range on Report

Discussion in 'Information Technology' started by POlsen, Jul 28, 2006.

Tags:
  1. POlsen

    POlsen
    Expand Collapse
    Guest

    Hello, I have ctreated a Report date Range Form already and I would like a
    pop up box to appear when I open a particular report to request the user to
    enter a start date and an end date. How do I do this? Thank you!
     
  2. Loading...


  3. Barry Gilbert

    Barry Gilbert
    Expand Collapse
    Guest

    The simplest way is to use parameters in the report's underlying query. For
    example, in the criteria row under the FromDate column, put [Enter From
    Date]. When the report runs, it will prompt the user for a date.

    HTH,
    Barry

    "POlsen" wrote:

    > Hello, I have ctreated a Report date Range Form already and I would like a
    > pop up box to appear when I open a particular report to request the user to
    > enter a start date and an end date. How do I do this? Thank you!
     
  4. fredg

    fredg
    Expand Collapse
    Guest

    On Thu, 18 May 2006 08:18:02 -0700, POlsen wrote:

    > Hello, I have ctreated a Report date Range Form already and I would like a
    > pop up box to appear when I open a particular report to request the user to
    > enter a start date and an end date. How do I do this? Thank you!


    Create an unbound form.

    Add 2 unbound text controls.
    Set their format to a valid date format.
    Name them "StartDate" and "EndDate"

    Add a Command Button to the form.
    Code the button's click event:

    Me.Visible = False

    Name this form 'ParamForm'.

    As criteria in the query (that is the Report's Record Source) date
    field write:

    Between forms!Paramform!StartDate and forms!ParamForm!EndDate

    Next, code the report's Open event:
    DoCmd.OpenForm "ParamForm", , , , , acDialog

    Code the report's Close event:
    DoCmd.Close acForm, "ParamForm"

    When ready to run the report, open the report.
    The form will open and wait for the entry of the starting and ending
    dates wanted.
    Click the command button and then report will run.
    When the report closes, it will close the form.

    --
    Fred
    Please respond only to this newsgroup.
    I do not reply to personal e-mail
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page