Group:  Microsoft Access ยป microsoft.public.access.macros
Thread: Use Direct-X date picker to pick date range for query

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Use Direct-X date picker to pick date range for query
Slappy 20.09.2006 20:05:02
I have set up a data base with a query-based form in which I enter a range of
dates to call up a set of records...so far so good. I also have a Direct-X
date picker which is very easy to use and which I can plunk almost anywhere
in a form. What I want to do is use the date picker to pick the dates for
the query. Can I do this with a macro (i.e. have two fields, each with a
date picker, saying "from (date)" and "to (date)" and then a button that puts
these two values into the two query prompts (i.e. "date from" and "date to")?
If this is possible how would I go about setting up the macro? Does anybody
know any other way I can do it? Basically what I want is to create a
query/form where it is easy to enter the date range.

Thanks for any responses.
RE: Use Direct-X date picker to pick date range for query
Barry Gilbert 21.09.2006 19:56:02
I don't think you need a macro. You can have your query point to the
DatePickers in the criteria row, that same as you would with a regular
textbox. For example, if your Date pickers are called txtDateFrom and
txtDateTo, under the date column in your query, you'd put this in the
criteria:
Between Forms!MyFormName!txtDateFrom and Forms!MyFormName!txtDateTo

Barry

"Slappy" wrote:

[Quoted Text]
> I have set up a data base with a query-based form in which I enter a range of
> dates to call up a set of records...so far so good. I also have a Direct-X
> date picker which is very easy to use and which I can plunk almost anywhere
> in a form. What I want to do is use the date picker to pick the dates for
> the query. Can I do this with a macro (i.e. have two fields, each with a
> date picker, saying "from (date)" and "to (date)" and then a button that puts
> these two values into the two query prompts (i.e. "date from" and "date to")?
> If this is possible how would I go about setting up the macro? Does anybody
> know any other way I can do it? Basically what I want is to create a
> query/form where it is easy to enter the date range.
>
> Thanks for any responses.
RE: Use Direct-X date picker to pick date range for query
Slappy 27.09.2006 00:07:02
Barry,

Thank you very much for the reply, I'll try that.

Slappy



"Barry Gilbert" wrote:

[Quoted Text]
> I don't think you need a macro. You can have your query point to the
> DatePickers in the criteria row, that same as you would with a regular
> textbox. For example, if your Date pickers are called txtDateFrom and
> txtDateTo, under the date column in your query, you'd put this in the
> criteria:
> Between Forms!MyFormName!txtDateFrom and Forms!MyFormName!txtDateTo
>
> Barry
>
> "Slappy" wrote:
>
> > I have set up a data base with a query-based form in which I enter a range of
> > dates to call up a set of records...so far so good. I also have a Direct-X
> > date picker which is very easy to use and which I can plunk almost anywhere
> > in a form. What I want to do is use the date picker to pick the dates for
> > the query. Can I do this with a macro (i.e. have two fields, each with a
> > date picker, saying "from (date)" and "to (date)" and then a button that puts
> > these two values into the two query prompts (i.e. "date from" and "date to")?
> > If this is possible how would I go about setting up the macro? Does anybody
> > know any other way I can do it? Basically what I want is to create a
> > query/form where it is easy to enter the date range.
> >
> > Thanks for any responses.

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net