Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    North Carolina
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Should be simple form (2000 SR1)

    This should be so simple but I am wondering if anyone can point me in the right direction to find an example of the code needed to: create a form where the user sets a beginning and ending date using the calendar control and these dates are set to a query and report, so when they set the dates, they can then preview or print the report. Thanks!

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Should be simple form (2000 SR1)

    Form (MyForm):
    Textbox: txtStartDate
    Textbox: txtEndDate
    Command Button: btnOpenReport (OnClick - DoCmd.OpenReport "MyReport", acViewPreview)
    Command Button: btnExit (OnClick - DoCmd.Close acForm, "MyForm")
    Calendar Control

    Query (MyQuery):
    fldDate: (Criteria: Between [Forms]![MyForm]![txtStartDate] And [Forms]![MyForm]![txtEndDate])
    (Any other data needed in the report)

    Report (MyReport):
    RecordSource = MyQuery


    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Location
    North Carolina
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Should be simple form (2000 SR1)

    Works beautifully, thanks Mark!

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Seattle, Washington, USA
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Should be simple form (2000 SR1)

    It's amazing how things like this work. Today, I was planning on asking EXACT same question that was posed yesterday! This solution is EXACTLY what I needed! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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