Parameter Criteria Date Picker

  • Follow


I have some queries that give Start and End Dates in separate criteria text
boxes to select a range of dates. Can these text boxes be replaced by Date
Picker control or have the Date Picker appear in the text Box?

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201003/1

1
Reply Bruister 3/27/2010 6:12:25 AM

If you are using Access 2007, there's a built in date picker that should 
fire if you set the Format property of the text box to General Date, and 
leave the Input Mask blank.

For any version, there's a simple little Access form here:
    http://allenbrowne.com/ser-51.html
Copy into your database.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"Bruister via AccessMonster.com" <u50445@uwe> wrote in message 
news:a59eeae05edfd@uwe...
> I have some queries that give Start and End Dates in separate criteria 
> text
> boxes to select a range of dates. Can these text boxes be replaced by Date
> Picker control or have the Date Picker appear in the text Box? 

0
Reply Allen 3/27/2010 11:35:02 AM

Allen Browne wrote:
>If you are using Access 2007, there's a built in date picker that should 
>fire if you set the Format property of the text box to General Date, and 
>leave the Input Mask blank.
>
>For any version, there's a simple little Access form here:
>    http://allenbrowne.com/ser-51.html
>Copy into your database.
>
>> I have some queries that give Start and End Dates in separate criteria 
>> text
>> boxes to select a range of dates. Can these text boxes be replaced by Date
>> Picker control or have the Date Picker appear in the text Box?

Sorry but I didnt make my request clear enough. I meant the boxes that are
titled 'Enter Parameter Value' that appear. At present I type a date, hit
enter and the second box appears, also waiting for a date to be typed. Can
the date picker be used instead? Thanks

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201003/1

0
Reply Bruister 3/27/2010 2:17:39 PM

No, there is no ability to do this directly in the query.  You have to create 
a form to gather the values and then reference the OPEN form's controls as 
criteria in the query.

Check out this article for a detailed discussion.
     http://www.fontstuff.com/access/acctut08.htm

Or check out this from MS
    http://office.microsoft.com/en-us/access/HA011730581033.aspx

Or for another example
http://allenbrowne.com/ser-62.html

The following talks about comboboxes, but you can apply the same technique to 
a text control on the form and the calendar control.

A brief quote from a John Vinson (Access MVP) posting.

You'll need to create a small unbound Form (let's call it frmCriteria) with a 
Combo Box control (cboCrit) on it. Use the combo box wizard to select the 
table for the selections, and be sure that the bound field of the combo is the 
value you want to use as a criterion. Save this form.

Now use

=[Forms]![frmCriteria]![cboCrit]

as the criterion in your Query.

It's convenient to base a second Form or Report on the resulting query to 
display the results; if you put a button on frmCriteria to launch that form or 
report, the user can enter the criterion and view the results in one simple 
operation!

End quote

Keywords: Parameter Queries,  comboboxes

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Bruister via AccessMonster.com wrote:
> Allen Browne wrote:
>> If you are using Access 2007, there's a built in date picker that should 
>> fire if you set the Format property of the text box to General Date, and 
>> leave the Input Mask blank.
>>
>> For any version, there's a simple little Access form here:
>>    http://allenbrowne.com/ser-51.html
>> Copy into your database.
>>
>>> I have some queries that give Start and End Dates in separate criteria 
>>> text
>>> boxes to select a range of dates. Can these text boxes be replaced by Date
>>> Picker control or have the Date Picker appear in the text Box?
> 
> Sorry but I didnt make my request clear enough. I meant the boxes that are
> titled 'Enter Parameter Value' that appear. At present I type a date, hit
> enter and the second box appears, also waiting for a date to be typed. Can
> the date picker be used instead? Thanks
> 
0
Reply John 3/27/2010 2:58:08 PM

3 Replies
3248 Views

(page loaded in 0.077 seconds)

10/19/2014 11:54:08 PM


Reply: