If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Parameter Queries
When you put in the Enter criteria for a query so that the user will have to
enter information first, such as entering a start date and then a finish date, how do you then get the query to show all records that fall either on or between those two entries? I can't seem to figure it out for the life of me. Thank you for the help it is very much appreciated and will bring much relief to my stress level from fighting with the formula's.. |
#2
|
|||
|
|||
Parameter Queries
To add a criteria/filter to a query, you enter the appropriate parameters
under the field/column in the Criteria row. IMO, parameter prompts are never appropriate user interface. Consider reading http://www.tek-tips.com/faqs.cfm?fid=6763. Use controls on forms for all user interaction. Feel free to use prompts for yes/no responses using MsgBox(). -- Duane Hookom MS Access MVP "goodgirlinterrupted" wrote in message ... When you put in the Enter criteria for a query so that the user will have to enter information first, such as entering a start date and then a finish date, how do you then get the query to show all records that fall either on or between those two entries? I can't seem to figure it out for the life of me. Thank you for the help it is very much appreciated and will bring much relief to my stress level from fighting with the formula's.. |
#3
|
|||
|
|||
Parameter Queries
On Sun, 14 Mar 2010 20:02:01 -0700, goodgirlinterrupted
wrote: When you put in the Enter criteria for a query so that the user will have to enter information first, such as entering a start date and then a finish date, how do you then get the query to show all records that fall either on or between those two entries? I can't seem to figure it out for the life of me. Thank you for the help it is very much appreciated and will bring much relief to my stress level from fighting with the formula's.. I fully agree with Duane, but to directly answer your question, a criterion of = [Enter start date:] AND [Enter end date:] + 1 will find all records from midnight at the beginning of the start date up to midnight at the *end* of the end date (the +1 ensures that). = [Forms]![YourFormName]![txtStartDate] AND DateAdd("d", 1, [Forms]![YourFormName]![txtEndDate]) does the same using a form to request the criteria. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|