how to create parameter dialogue box in access?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brin
    New Member
    • Sep 2010
    • 9

    how to create parameter dialogue box in access?

    hello guru's

    im tryn to create a custom dialogue box.
    basically im tryn to find a between dates for payments for suppliers. I got the query with date. date got a between as criteria. cn sum one guide me how to create a custom dialogue form to enter BEGIN DATE and END DATE. when user press ok, it should show the payment report. Infact i got the report redy to. thanks in advance.
  • liimra
    New Member
    • Aug 2010
    • 119

    #2
    Solution/

    Create a form (form design). Create two text boxes for "From" & "To" dates. Then create the "Ok Button" and add "OpenReport " function to the OnClick event.

    Code:
    DoCmd.OpenReport "ReportName", acViewReport, "", "[DateFieldNameFromTable] Between [Forms]![FormName]![FromDateNameOnForm] And [Forms]![ER]![ToDateNameOnForm]", acNormal
    Change the names in the above code to yours. This command will open the report you choose, the view will be "Report View", and the criteria will be the date. Of course you can add more criteria as you may require using "And" between each one.

    Regards,
    Ali

    Comment

    Working...