input box

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

I created a query to pull records based on dates. I then
added a button to my switchboard to run the query. I
would like to have a box pop up after the button is
pushed where I could enter a date range. I would like it
to have 2 input fields.One for the beginning date and one
for the end date. Can someone tell me how to do this?
Thanks in advance.
 
open the query in design view. set the criteria for the date as follows:

Between [Enter Start Date] And [Enter End Date]

on the menu bar, click Query, Parameters. set one line for each parameter,
as
Parameter
[Enter Start Date]
Data Type
Date/Time
2nd line
Parameter
[Enter End Date]
Data Type
Date/Time

note that the Between...And... statement is "inclusive", i.e. Between July 1
2004 And July 15 2004 will include records dated July 1, and records dated
July 15.

having said all that, i'll add that personally i don't care for parameter
queries. i prefer to open a dialog box (a small form) with unbound controls
for entering the dates, and setting the query criteria to
Between Forms!DialogFormName!StartDateControlName And
Forms!DialogFormName!EndDateControlName
i find it easier to control/validate the dates entered by the user, from a
form.

hth
 
Tina,
I would agree. I find that the end user has less troubles understanding the
prompt when it is form based (i.e. pop-up dialog box).

----------
Rohn Everson

open the query in design view. set the criteria for the date as follows:

Between [Enter Start Date] And [Enter End Date]

on the menu bar, click Query, Parameters. set one line for each parameter,
as
Parameter
[Enter Start Date]
Data Type
Date/Time
2nd line
Parameter
[Enter End Date]
Data Type
Date/Time

note that the Between...And... statement is "inclusive", i.e. Between July 1
2004 And July 15 2004 will include records dated July 1, and records dated
July 15.

having said all that, i'll add that personally i don't care for parameter
queries. i prefer to open a dialog box (a small form) with unbound controls
for entering the dates, and setting the query criteria to
Between Forms!DialogFormName!StartDateControlName And
Forms!DialogFormName!EndDateControlName
i find it easier to control/validate the dates entered by the user, from a
form.

hth
 
Thanks for the reply. I got the query to work using the
parameter query but was unable to make it work with a
dialog box. Once again, thanks for the replies.
-----Original Message-----
open the query in design view. set the criteria for the date as follows:

Between [Enter Start Date] And [Enter End Date]

on the menu bar, click Query, Parameters. set one line for each parameter,
as
Parameter
[Enter Start Date]
Data Type
Date/Time
2nd line
Parameter
[Enter End Date]
Data Type
Date/Time

note that the Between...And... statement is "inclusive", i.e. Between July 1
2004 And July 15 2004 will include records dated July 1, and records dated
July 15.

having said all that, i'll add that personally i don't care for parameter
queries. i prefer to open a dialog box (a small form) with unbound controls
for entering the dates, and setting the query criteria to
Between Forms!DialogFormName!StartDateControlName And
Forms!DialogFormName!EndDateControlName
i find it easier to control/validate the dates entered by the user, from a
form.

hth


I created a query to pull records based on dates. I then
added a button to my switchboard to run the query. I
would like to have a box pop up after the button is
pushed where I could enter a date range. I would like it
to have 2 input fields.One for the beginning date and one
for the end date. Can someone tell me how to do this?
Thanks in advance.


.
 
Back
Top