K
karenfocus
How can I use Between/And to prompt for date range that includes the start
and end date?
and end date?
How can I use Between/And to prompt for date range that includes the start
and end date?
karenfocus said:My current criteria is in a query date field and is written
Between [Enter start date] And [Enter end date]
but when I run the query from the first day of the month to the last it
does
not include the first or last day of the month. Any suggestions much
appreciated,
Karenfocus
Jahanzaib said:Hi,
Design a select query for your table.
add all fields to the design grid.
In criteria box of the date field write this
Between #BeginningDate# And #EndingDate#
and run the query to find results.
JB
Douglas J. Steele said:You sure it's not including the first day?
If the date field also includes time, it makes sense that it wouldn't
include the last day. However, that's easily fixed by changing your query to
Between [Enter start date] And DateAdd("d", 1, [Enter end date])
or, if you're a purist
Between [Enter start date] And DateAdd("s", 86399, [Enter end date])
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
karenfocus said:My current criteria is in a query date field and is written
Between [Enter start date] And [Enter end date]
but when I run the query from the first day of the month to the last it
does
not include the first or last day of the month. Any suggestions much
appreciated,
Karenfocus
Jahanzaib said:Hi,
Design a select query for your table.
add all fields to the design grid.
In criteria box of the date field write this
Between #BeginningDate# And #EndingDate#
and run the query to find results.
JB
:
How can I use Between/And to prompt for date range that includes the
start
and end date?
Douglas J. Steele said:You sure it's not including the first day?
If the date field also includes time, it makes sense that it wouldn't
include the last day. However, that's easily fixed by changing your query to
Between [Enter start date] And DateAdd("d", 1, [Enter end date])
or, if you're a purist
Between [Enter start date] And DateAdd("s", 86399, [Enter end date])
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
karenfocus said:My current criteria is in a query date field and is written
Between [Enter start date] And [Enter end date]
but when I run the query from the first day of the month to the last it
does
not include the first or last day of the month. Any suggestions much
appreciated,
Karenfocus
Jahanzaib said:Hi,
Design a select query for your table.
add all fields to the design grid.
In criteria box of the date field write this
Between #BeginningDate# And #EndingDate#
and run the query to find results.
JB
:
How can I use Between/And to prompt for date range that includes the
start
and end date?
tmdrake said:This is very interesting. If I may, please tell me how to incorporate
this
code with the following:
Private Sub LastName_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = Me.LastName
stDocName = "frmProjectStaffingDetails"
DoCmd.OpenForm stDocName, , , "LastName = " & stLinkCriteria
End Sub
My objective is to have the user double click on the LastName and a form
pops up to display the information pertaining to that name in a specific
time
frame.
Help is greatly appreciated.
Thanks
--
tmdrake
Douglas J. Steele said:You sure it's not including the first day?
If the date field also includes time, it makes sense that it wouldn't
include the last day. However, that's easily fixed by changing your query
to
Between [Enter start date] And DateAdd("d", 1, [Enter end date])
or, if you're a purist
Between [Enter start date] And DateAdd("s", 86399, [Enter end date])
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
karenfocus said:My current criteria is in a query date field and is written
Between [Enter start date] And [Enter end date]
but when I run the query from the first day of the month to the last it
does
not include the first or last day of the month. Any suggestions much
appreciated,
Karenfocus
:
Hi,
Design a select query for your table.
add all fields to the design grid.
In criteria box of the date field write this
Between #BeginningDate# And #EndingDate#
and run the query to find results.
JB
:
How can I use Between/And to prompt for date range that includes the
start
and end date?