Unable to View Data

N

nutmeg

I have a query that is parameters set to run from a form with a beginning
date and an ending date. The field is a Date/Time field, set with hrs and
mins to show as well as the date in long format.

My challenge is that it would just run for one date i.e. Jan 04/05. If I
enter both a beginning and end date as 01/04/05 it returns nothing though
there is a lot of data. If I change it to 01/04/05 and 01/05/05, it runs the
01/04/05 date fine. Problem is that all the other reports that are tied to
the same period i.e. one date run just this query doesn't run which makes the
subreport not run.

Can anyone give me some help to know what is going on.
Thanks,
IEJ
 
R

Rick B

What is your query criteria?

You have to tell us what you have as your query before we can tell you what
is wrong with it.
 
N

nutmeg

My apologies, the Date field has this as the criteria:
Between [Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtBeginningDate] And
[Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtEndingDate]
Is this what you are referring to?

Thank you,
IEJ
 
J

John Vinson

My apologies, the Date field has this as the criteria:
Between [Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtBeginningDate] And
[Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtEndingDate]
Is this what you are referring to?

The problem is that #2005-06-21 11:32:00# is NOT between #2005-06-21#
and #2005-06-21# - it's about eleven and a half hours later than your
End!

Try using a criterion
= [Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtBeginningDate] And
< DateAdd("d", 1,
[Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtEndingDate])


John W. Vinson[MVP]
 
N

nutmeg

Thank you so much, this worked just fine.
IEJ

John Vinson said:
My apologies, the Date field has this as the criteria:
Between [Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtBeginningDate] And
[Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtEndingDate]
Is this what you are referring to?

The problem is that #2005-06-21 11:32:00# is NOT between #2005-06-21#
and #2005-06-21# - it's about eleven and a half hours later than your
End!

Try using a criterion
= [Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtBeginningDate] And
< DateAdd("d", 1,
[Forms]![ME-SLB15-sfrmPrintDialogueBox]![txtEndingDate])


John W. Vinson[MVP]
 
Top