none
Using a form to search for access data by entering certian dates RRS feed

  • Question

  • Hello,

    I am currently working on a large database. I would like for a user to be able to search for certain records by entering a start and end date of their choosing.

    I currently have a table with an assigned date and a released date.

    I want the user to be able to view a weekly report of records based on the start and end dates they choose.

    For example:

    User puts in Start Date as 2/06/2017 and End Date as 2/10/2017.

    The report should generate all NON released records up to 2/10/2017 and ONLY released records between the dates entered.

    Is this possible??

    I would greatly appreciate any help you can give.

    Monday, February 13, 2017 8:27 PM

All replies

  • Hi,

    You might try something like:

    ReleaseDate >= [Enter Start Date] AND AssignedDate <= [Enter End Date]

    Hope it helps...

    Monday, February 13, 2017 9:30 PM
  • The report should generate all NON released records up to 2/10/2017 and ONLY released records between the dates entered.

    Hi MageNiema,

    Almost the same as .theDBguy, I would go for:

        ReleaseDate IS NULL OR (ReleaseDate >= [Enter Start Date] AND AssignedDate < [Enter End Date] + 1)

    assuming the EndDate is included in the retrieved collection.

    The inequality sign only is in my opinion essential to prevent duplication of points of time in subsequent time periods.

    Imb.

    Monday, February 13, 2017 10:32 PM
  • Hi, Thank you for your reply.

    Is this what I would type into the query under "ReleaseDate"? I am also trying use a form where the start date is entered and the end, then a button will run the query.

    Tuesday, February 14, 2017 6:08 PM
  • Hi,

    If you want to use a form, you use a form reference rather than a parameter request. If you're modifying the query in  design view, you could, for example, type the following criteria below the ReleaseDate field:

    Field: ReleaseDate

    Criteria: >=Forms!FormName.StartDate

    You'll do the same for the AssignDate field, except referring to the EndDate box on the form.

    Hope it helps...

    Tuesday, February 14, 2017 6:17 PM