Parameter for date

J

jk

Hello,

I have a query which has three parameters but one parameter is not working
correctly and that is the date parameter. The criteria is Between [Start
date:] And [End date:] but it retrieves all records.Does parameter queries
for this type of criteria work when using multiple parameters?
thanks
 
M

[MVP] S.Clark

In the design view for the query, choose Query / Parameters from the main
menu. Assign a data type to each parameter. Sometimes it misinterprets the
types.
 
J

jk

THANKS

I continue to get the entire dates and not the specific ones i type into the
date parameter.Below is the sql for the where statement in parameters

WHERE (((InvoiceDetails1.DteComplete) Between [Start date:] And [End date:])
AND ((AdjCdes1.AdjDescRB)=[Enter three-letter code:])) OR
(((AdjCdes1.AdjDescWO)=[Enter three-letter code:]));

please advise if there is a problem in above...thanks





[MVP] S.Clark said:
In the design view for the query, choose Query / Parameters from the main
menu. Assign a data type to each parameter. Sometimes it misinterprets the
types.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

jk said:
Hello,

I have a query which has three parameters but one parameter is not working
correctly and that is the date parameter. The criteria is Between [Start
date:] And [End date:] but it retrieves all records.Does parameter queries
for this type of criteria work when using multiple parameters?
thanks
 
D

Duane Hookom

PMFJI, try change the " OR " to " AND ".

--
Duane Hookom
MS Access MVP
--

jk said:
THANKS

I continue to get the entire dates and not the specific ones i type into
the
date parameter.Below is the sql for the where statement in parameters

WHERE (((InvoiceDetails1.DteComplete) Between [Start date:] And [End
date:])
AND ((AdjCdes1.AdjDescRB)=[Enter three-letter code:])) OR
(((AdjCdes1.AdjDescWO)=[Enter three-letter code:]));

please advise if there is a problem in above...thanks





[MVP] S.Clark said:
In the design view for the query, choose Query / Parameters from the main
menu. Assign a data type to each parameter. Sometimes it misinterprets
the
types.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

jk said:
Hello,

I have a query which has three parameters but one parameter is not working
correctly and that is the date parameter. The criteria is Between
[Start
date:] And [End date:] but it retrieves all records.Does parameter
queries
for this type of criteria work when using multiple parameters?
thanks
 
J

jk

Thanks Duane but the query just blows through the date criteria as if it did
not exist even with the "or" as in below view:

WHERE (((InvoiceDetails1.DteComplete) Between [Start date:] And [End date:])
AND ((AdjCdes1.AdjDescWO)=[Enter three-letter code:]) OR
((AdjCdes1.AdjDescRB)=[Enter three-letter code:])) OR
(((AdjCdes1.AdjDescWO)=[Enter three-letter code:]));

any advise is greatly appreciated...

Duane Hookom said:
PMFJI, try change the " OR " to " AND ".

--
Duane Hookom
MS Access MVP
--

jk said:
THANKS

I continue to get the entire dates and not the specific ones i type into
the
date parameter.Below is the sql for the where statement in parameters

WHERE (((InvoiceDetails1.DteComplete) Between [Start date:] And [End
date:])
AND ((AdjCdes1.AdjDescRB)=[Enter three-letter code:])) OR
(((AdjCdes1.AdjDescWO)=[Enter three-letter code:]));

please advise if there is a problem in above...thanks





[MVP] S.Clark said:
In the design view for the query, choose Query / Parameters from the main
menu. Assign a data type to each parameter. Sometimes it misinterprets
the
types.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

Hello,

I have a query which has three parameters but one parameter is not
working
correctly and that is the date parameter. The criteria is Between
[Start
date:] And [End date:] but it retrieves all records.Does parameter
queries
for this type of criteria work when using multiple parameters?
thanks
 
D

Duane Hookom

Try:
WHERE InvoiceDetails1.DteComplete Between [Start date:] And [End date:]
AND (AdjCdes1.AdjDescWO=[Enter three-letter code:] OR
AdjCdes1.AdjDescRB=[Enter three-letter code:]);


--
Duane Hookom
MS Access MVP
--

jk said:
Thanks Duane but the query just blows through the date criteria as if it
did
not exist even with the "or" as in below view:

WHERE (((InvoiceDetails1.DteComplete) Between [Start date:] And [End
date:])
AND ((AdjCdes1.AdjDescWO)=[Enter three-letter code:]) OR
((AdjCdes1.AdjDescRB)=[Enter three-letter code:])) OR
(((AdjCdes1.AdjDescWO)=[Enter three-letter code:]));

any advise is greatly appreciated...

Duane Hookom said:
PMFJI, try change the " OR " to " AND ".

--
Duane Hookom
MS Access MVP
--

jk said:
THANKS

I continue to get the entire dates and not the specific ones i type
into
the
date parameter.Below is the sql for the where statement in parameters

WHERE (((InvoiceDetails1.DteComplete) Between [Start date:] And [End
date:])
AND ((AdjCdes1.AdjDescRB)=[Enter three-letter code:])) OR
(((AdjCdes1.AdjDescWO)=[Enter three-letter code:]));

please advise if there is a problem in above...thanks





:

In the design view for the query, choose Query / Parameters from the
main
menu. Assign a data type to each parameter. Sometimes it
misinterprets
the
types.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

Hello,

I have a query which has three parameters but one parameter is not
working
correctly and that is the date parameter. The criteria is Between
[Start
date:] And [End date:] but it retrieves all records.Does parameter
queries
for this type of criteria work when using multiple parameters?
thanks
 
Top