Query between a date range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to do a query between August 3 - October 31. Is there a formula
that I have to put in to get the results between these date? Please help.
 
Jenn

Open a query in design mode. Select the fields you want to see. Select the
"date" field you are using for a selection criterion.

In the row labeled "criteria", use the "Between ... And ..." function. If
you are ONLY interested in the dates you mentioned, use something like:

Between #8/3/2004# And #10/31/2004#

If you are interested in entering values, to search different date ranges,
make it into a parameter query, using something like:

Betweeen [Enter Start Date] And [Enter End Date]
 
hi,
no formula. this is criteria that should be put in the
criteria pane in design mode
 
Is there a method using only 1 date that will prompt you for it?

--

Joe Cilinceon


Jeff Boyce said:
Jenn

Open a query in design mode. Select the fields you want to see. Select the
"date" field you are using for a selection criterion.

In the row labeled "criteria", use the "Between ... And ..." function. If
you are ONLY interested in the dates you mentioned, use something like:

Between #8/3/2004# And #10/31/2004#

If you are interested in entering values, to search different date ranges,
make it into a parameter query, using something like:

Betweeen [Enter Start Date] And [Enter End Date]

--
Good luck

Jeff Boyce
<Access MVP>


Jenn Connors said:
I am trying to do a query between August 3 - October 31. Is there a formula
that I have to put in to get the results between these date? Please
help.
 
If you want a one week range, for instance, you can use something like:

Betweeen [Enter Start Date] And DateAdd("w", 1, [Enter Start Date])

The "trick" is to make sure the two references to the prompt are identical:
same spelling, spaces, punctuation, etc.. If not, you'll be prompted twice.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Joe Cilinceon said:
Is there a method using only 1 date that will prompt you for it?

--

Joe Cilinceon


Jeff Boyce said:
Jenn

Open a query in design mode. Select the fields you want to see. Select the
"date" field you are using for a selection criterion.

In the row labeled "criteria", use the "Between ... And ..." function. If
you are ONLY interested in the dates you mentioned, use something like:

Between #8/3/2004# And #10/31/2004#

If you are interested in entering values, to search different date ranges,
make it into a parameter query, using something like:

Betweeen [Enter Start Date] And [Enter End Date]

--
Good luck

Jeff Boyce
<Access MVP>


Jenn Connors said:
I am trying to do a query between August 3 - October 31. Is there a formula
that I have to put in to get the results between these date? Please
help.
 
Actually is there a way to be prompted for just one date or is Between the
only method. If so will Between[Enter Date] And Date([Enter Date]} work?

--

Joe Cilinceon


Douglas J. Steele said:
If you want a one week range, for instance, you can use something like:

Betweeen [Enter Start Date] And DateAdd("w", 1, [Enter Start Date])

The "trick" is to make sure the two references to the prompt are identical:
same spelling, spaces, punctuation, etc.. If not, you'll be prompted twice.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Joe Cilinceon said:
Is there a method using only 1 date that will prompt you for it?

--

Joe Cilinceon


Jenn

Open a query in design mode. Select the fields you want to see.
Select
the
"date" field you are using for a selection criterion.

In the row labeled "criteria", use the "Between ... And ..." function. If
you are ONLY interested in the dates you mentioned, use something like:

Between #8/3/2004# And #10/31/2004#

If you are interested in entering values, to search different date ranges,
make it into a parameter query, using something like:

Betweeen [Enter Start Date] And [Enter End Date]

--
Good luck

Jeff Boyce
<Access MVP>


I am trying to do a query between August 3 - October 31. Is there a
formula
that I have to put in to get the results between these date? Please help.
 
Oh. You mean something like = [Enter Date]

I assumed that your question was related to the original question. In the
future, you may find it a better idea to start a new thread, rather than
tagging your question onto someone else's.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Joe Cilinceon said:
Actually is there a way to be prompted for just one date or is Between the
only method. If so will Between[Enter Date] And Date([Enter Date]} work?

--

Joe Cilinceon


Douglas J. Steele said:
If you want a one week range, for instance, you can use something like:

Betweeen [Enter Start Date] And DateAdd("w", 1, [Enter Start Date])

The "trick" is to make sure the two references to the prompt are identical:
same spelling, spaces, punctuation, etc.. If not, you'll be prompted twice.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Joe Cilinceon said:
Is there a method using only 1 date that will prompt you for it?

--

Joe Cilinceon


Jenn

Open a query in design mode. Select the fields you want to see. Select
the
"date" field you are using for a selection criterion.

In the row labeled "criteria", use the "Between ... And ..."
function.
If
you are ONLY interested in the dates you mentioned, use something like:

Between #8/3/2004# And #10/31/2004#

If you are interested in entering values, to search different date ranges,
make it into a parameter query, using something like:

Betweeen [Enter Start Date] And [Enter End Date]

--
Good luck

Jeff Boyce
<Access MVP>


I am trying to do a query between August 3 - October 31. Is there a
formula
that I have to put in to get the results between these date? Please
help.
 
Back
Top