Senin, 23 Mei 2011

Re: [MS_AccessPros] Date format input mask in query

 

John,

I created the form, put in the hide button and referenced it in the query. If I open the form and put in a date before I open the query, works perfect!!!

Only problem is, when the form opens it does not wait for the input or the hide button to be clicked before it continues,...so I get the parameter dialog anyway.

How do I make it wait for the button to be clicked?

Thanks, Steven

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Steven-
>
> No can do. You can force the dialog box to accept only values that can be
> interpreted as date/time by adding:
>
> PARAMETERS [Enter Reporting Date:] Date;
>
> .. to the front of the SQL in your query.
>
> If you want to control the format / input mask, use a parameter form and
> reference it as:
>
> [Forms][frmEnterDate]![txtDate]
>
> You can use the Open event of the report to open the form. Put an OK button on
> the form that just hides it so the report query can find the parameter.
> (Me.Visible = False) In the Close event of the Report, close the parameter
> form.
>
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of S and M
> Sent: Monday, May 23, 2011 4:53 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Date format input mask in query
>
> Hey everyone,
>
> I have a report based on a query that ask for a report date like this,...
>
> WHERE (((qryEventRevenueWithMemberName.RegDate)=[Enter Reporting Date:]));
>
> When the dialog box pops up to enter the date, it requires that you type in the
> / marks. I would like this to automatically show the / marks just like it does
> in date fields in forms when you set the input mask to short date.
>
> I set the input mask for the criteria in the query but that did not fix it.
>
> What am I missing?
>
> Thanks, Steven
>
> Access 2003 on XP
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Recent Activity:
MARKETPLACE

Find useful articles and helpful tips on living with Fibromyalgia. Visit the Fibromyalgia Zone today!


Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar