Date Problem

N

Neill M. Pinkney

Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and [Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and txtEnd and a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two unbound text
boxes on the report to show txtStart & txtStop the values show the correct
data.

I have tried making all references to the date (in the table, in the query
on the form) all short date.

What am I doing wrong?
 
A

Allen Browne

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time field.
If it's a Text field in your table, or a calculated field in the query, it
may need further help.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
N

Neill M. Pinkney

Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date in every
reference (the underlying table, the query the report is based off, the form
that drives the report and the report itself).
Any further ideas?

Allen Browne said:
Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time field.
If it's a Text field in your table, or a calculated field in the query, it
may need further help.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and [Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and txtEnd and a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two unbound
text
boxes on the report to show txtStart & txtStop the values show the correct
data.

I have tried making all references to the date (in the table, in the query
on the form) all short date.

What am I doing wrong?
 
A

Allen Browne

When the report opens with no records, ask Access how it is being filtered.

Assuming a report name of Report1, open the Immediate Window (Ctrl+G), and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date in
every
reference (the underlying table, the query the report is based off, the
form
that drives the report and the report itself).
Any further ideas?

Allen Browne said:
Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time
field.
If it's a Text field in your table, or a calculated field in the query,
it
may need further help.

message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and [Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and txtEnd and
a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two unbound
text
boxes on the report to show txtStart & txtStop the values show the
correct
data.

I have tried making all references to the date (in the table, in the
query
on the form) all short date.
 
N

Neill M. Pinkney

Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two unbound text
boxes on the report that are reporting the values from the forms fields
correctly.

Allen Browne said:
When the report opens with no records, ask Access how it is being filtered.

Assuming a report name of Report1, open the Immediate Window (Ctrl+G), and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date in
every
reference (the underlying table, the query the report is based off, the
form
that drives the report and the report itself).
Any further ideas?

Allen Browne said:
Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time
field.
If it's a Text field in your table, or a calculated field in the query,
it
may need further help.

message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and [Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and txtEnd and
a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two unbound
text
boxes on the report to show txtStart & txtStop the values show the
correct
data.

I have tried making all references to the date (in the table, in the
query
on the form) all short date.
 
A

Allen Browne

Okay, the problem is with the expression you are passing to the filter.

Presumably when you run the query directly, you are getting the desired
records.

How are you opening the report? Is there an expression that Access is
evaluating to 0 (i.e. False for all records)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two unbound
text
boxes on the report that are reporting the values from the forms fields
correctly.

Allen Browne said:
When the report opens with no records, ask Access how it is being
filtered.

Assuming a report name of Report1, open the Immediate Window (Ctrl+G),
and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date in
every
reference (the underlying table, the query the report is based off, the
form
that drives the report and the report itself).
Any further ideas?

:

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time
field.
If it's a Text field in your table, or a calculated field in the
query,
it
may need further help.

message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and
[Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and txtEnd
and
a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two
unbound
text
boxes on the report to show txtStart & txtStop the values show the
correct
data.

I have tried making all references to the date (in the table, in the
query
on the form) all short date.
 
N

Neill M. Pinkney

Hi Allen

Yes. If I open the report directly from the reports section of the database
window and key in the same date range in the date dialog boxes that pop-up
(drivenby the criterea in the underlying query) - I get the desired result.

I launch the report from a button on the form that has the txtStart and
txtStop text boxes. It just runs the standard generated command button vb
script:-
Dim stDocName As String
stDocName = "rptVariationbyDate"
DoCmd.OpenReport stDocName, acPreview

The report pops up over the top of the form, so my understanding is that it
should still have reference to the contols on that form until such a time
that the form is destroyed.

Allen Browne said:
Okay, the problem is with the expression you are passing to the filter.

Presumably when you run the query directly, you are getting the desired
records.

How are you opening the report? Is there an expression that Access is
evaluating to 0 (i.e. False for all records)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two unbound
text
boxes on the report that are reporting the values from the forms fields
correctly.

Allen Browne said:
When the report opens with no records, ask Access how it is being
filtered.

Assuming a report name of Report1, open the Immediate Window (Ctrl+G),
and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date in
every
reference (the underlying table, the query the report is based off, the
form
that drives the report and the report itself).
Any further ideas?

:

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time
field.
If it's a Text field in your table, or a calculated field in the
query,
it
may need further help.

message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and
[Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and txtEnd
and
a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two
unbound
text
boxes on the report to show txtStart & txtStop the values show the
correct
data.

I have tried making all references to the date (in the table, in the
query
on the form) all short date.
 
A

Allen Browne

Something else is applying a filter to yoru report.

Open the report in design view, clear anything in its Filter property, and
set the Filter On Load property to No.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

Yes. If I open the report directly from the reports section of the
database
window and key in the same date range in the date dialog boxes that pop-up
(drivenby the criterea in the underlying query) - I get the desired
result.

I launch the report from a button on the form that has the txtStart and
txtStop text boxes. It just runs the standard generated command button vb
script:-
Dim stDocName As String
stDocName = "rptVariationbyDate"
DoCmd.OpenReport stDocName, acPreview

The report pops up over the top of the form, so my understanding is that
it
should still have reference to the contols on that form until such a time
that the form is destroyed.

Allen Browne said:
Okay, the problem is with the expression you are passing to the filter.

Presumably when you run the query directly, you are getting the desired
records.

How are you opening the report? Is there an expression that Access is
evaluating to 0 (i.e. False for all records)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two unbound
text
boxes on the report that are reporting the values from the forms fields
correctly.

:

When the report opens with no records, ask Access how it is being
filtered.

Assuming a report name of Report1, open the Immediate Window (Ctrl+G),
and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date
in
every
reference (the underlying table, the query the report is based off,
the
form
that drives the report and the report itself).
Any further ideas?

:

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time
field.
If it's a Text field in your table, or a calculated field in the
query,
it
may need further help.

in
message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and
[Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and
txtEnd
and
a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two
unbound
text
boxes on the report to show txtStart & txtStop the values show
the
correct
data.

I have tried making all references to the date (in the table, in
the
query
on the form) all short date.
 
N

Neill M. Pinkney

HI Allen

Sorry - these are the current properties of the report.

Allen Browne said:
Something else is applying a filter to yoru report.

Open the report in design view, clear anything in its Filter property, and
set the Filter On Load property to No.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

Yes. If I open the report directly from the reports section of the
database
window and key in the same date range in the date dialog boxes that pop-up
(drivenby the criterea in the underlying query) - I get the desired
result.

I launch the report from a button on the form that has the txtStart and
txtStop text boxes. It just runs the standard generated command button vb
script:-
Dim stDocName As String
stDocName = "rptVariationbyDate"
DoCmd.OpenReport stDocName, acPreview

The report pops up over the top of the form, so my understanding is that
it
should still have reference to the contols on that form until such a time
that the form is destroyed.

Allen Browne said:
Okay, the problem is with the expression you are passing to the filter.

Presumably when you run the query directly, you are getting the desired
records.

How are you opening the report? Is there an expression that Access is
evaluating to 0 (i.e. False for all records)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two unbound
text
boxes on the report that are reporting the values from the forms fields
correctly.

:

When the report opens with no records, ask Access how it is being
filtered.

Assuming a report name of Report1, open the Immediate Window (Ctrl+G),
and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date
in
every
reference (the underlying table, the query the report is based off,
the
form
that drives the report and the report itself).
Any further ideas?

:

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time
field.
If it's a Text field in your table, or a calculated field in the
query,
it
may need further help.

in
message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and
[Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and
txtEnd
and
a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two
unbound
text
boxes on the report to show txtStart & txtStop the values show
the
correct
data.

I have tried making all references to the date (in the table, in
the
query
on the form) all short date.
 
N

Neill M. Pinkney

Hi Allen

You may be onto something here.
If I replace the vb code with a macro and in the where condition put :-
[dtDateEvent] Between [Forms]![frmReports]![txtStart] and
[Forms]![frmReports]![txtEnd]

the report gives me the results I need. if I put this in the filter property
of the report amd turn the filters on it doesn't!!!

My problem appears to be resolved, however for peace of mind I still would
like to find out why the logic of my previous approach does not work.

Allen Browne said:
Something else is applying a filter to yoru report.

Open the report in design view, clear anything in its Filter property, and
set the Filter On Load property to No.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

Yes. If I open the report directly from the reports section of the
database
window and key in the same date range in the date dialog boxes that pop-up
(drivenby the criterea in the underlying query) - I get the desired
result.

I launch the report from a button on the form that has the txtStart and
txtStop text boxes. It just runs the standard generated command button vb
script:-
Dim stDocName As String
stDocName = "rptVariationbyDate"
DoCmd.OpenReport stDocName, acPreview

The report pops up over the top of the form, so my understanding is that
it
should still have reference to the contols on that form until such a time
that the form is destroyed.

Allen Browne said:
Okay, the problem is with the expression you are passing to the filter.

Presumably when you run the query directly, you are getting the desired
records.

How are you opening the report? Is there an expression that Access is
evaluating to 0 (i.e. False for all records)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two unbound
text
boxes on the report that are reporting the values from the forms fields
correctly.

:

When the report opens with no records, ask Access how it is being
filtered.

Assuming a report name of Report1, open the Immediate Window (Ctrl+G),
and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short date
in
every
reference (the underlying table, the query the report is based off,
the
form
that drives the report and the report itself).
Any further ideas?

:

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a date/time
field.
If it's a Text field in your table, or a calculated field in the
query,
it
may need further help.

in
message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and
[Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and
txtEnd
and
a
button to open a report whose data is based on the above query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two
unbound
text
boxes on the report to show txtStart & txtStop the values show
the
correct
data.

I have tried making all references to the date (in the table, in
the
query
on the form) all short date.
 
A

Allen Browne

In code, concatenate the date values from the unbound text boxes into the
filter string.

Here's an example of the code:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

You may be onto something here.
If I replace the vb code with a macro and in the where condition put :-
[dtDateEvent] Between [Forms]![frmReports]![txtStart] and
[Forms]![frmReports]![txtEnd]

the report gives me the results I need. if I put this in the filter
property
of the report amd turn the filters on it doesn't!!!

My problem appears to be resolved, however for peace of mind I still would
like to find out why the logic of my previous approach does not work.

Allen Browne said:
Something else is applying a filter to yoru report.

Open the report in design view, clear anything in its Filter property,
and
set the Filter On Load property to No.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

Yes. If I open the report directly from the reports section of the
database
window and key in the same date range in the date dialog boxes that
pop-up
(drivenby the criterea in the underlying query) - I get the desired
result.

I launch the report from a button on the form that has the txtStart and
txtStop text boxes. It just runs the standard generated command button
vb
script:-
Dim stDocName As String
stDocName = "rptVariationbyDate"
DoCmd.OpenReport stDocName, acPreview

The report pops up over the top of the form, so my understanding is
that
it
should still have reference to the contols on that form until such a
time
that the form is destroyed.

:

Okay, the problem is with the expression you are passing to the
filter.

Presumably when you run the query directly, you are getting the
desired
records.

How are you opening the report? Is there an expression that Access is
evaluating to 0 (i.e. False for all records)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two
unbound
text
boxes on the report that are reporting the values from the forms
fields
correctly.

:

When the report opens with no records, ask Access how it is being
filtered.

Assuming a report name of Report1, open the Immediate Window
(Ctrl+G),
and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

in
message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short
date
in
every
reference (the underlying table, the query the report is based
off,
the
form
that drives the report and the report itself).
Any further ideas?

:

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a
date/time
field.
If it's a Text field in your table, or a calculated field in the
query,
it
may need further help.

"Neill M. Pinkney" <[email protected]>
wrote
in
message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and
[Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and
txtEnd
and
a
button to open a report whose data is based on the above
query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two
unbound
text
boxes on the report to show txtStart & txtStop the values show
the
correct
data.

I have tried making all references to the date (in the table,
in
the
query
on the form) all short date.
 
N

Neill M. Pinkney

Hi Allen

That worked a treat.
Thanks for your help!!

Allen Browne said:
In code, concatenate the date values from the unbound text boxes into the
filter string.

Here's an example of the code:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

You may be onto something here.
If I replace the vb code with a macro and in the where condition put :-
[dtDateEvent] Between [Forms]![frmReports]![txtStart] and
[Forms]![frmReports]![txtEnd]

the report gives me the results I need. if I put this in the filter
property
of the report amd turn the filters on it doesn't!!!

My problem appears to be resolved, however for peace of mind I still would
like to find out why the logic of my previous approach does not work.

Allen Browne said:
Something else is applying a filter to yoru report.

Open the report in design view, clear anything in its Filter property,
and
set the Filter On Load property to No.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

Yes. If I open the report directly from the reports section of the
database
window and key in the same date range in the date dialog boxes that
pop-up
(drivenby the criterea in the underlying query) - I get the desired
result.

I launch the report from a button on the form that has the txtStart and
txtStop text boxes. It just runs the standard generated command button
vb
script:-
Dim stDocName As String
stDocName = "rptVariationbyDate"
DoCmd.OpenReport stDocName, acPreview

The report pops up over the top of the form, so my understanding is
that
it
should still have reference to the contols on that form until such a
time
that the form is destroyed.

:

Okay, the problem is with the expression you are passing to the
filter.

Presumably when you run the query directly, you are getting the
desired
records.

How are you opening the report? Is there an expression that Access is
evaluating to 0 (i.e. False for all records)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
Hi Allen

In the intermediate window I get:-

?Reports![rptVariationbyDate].Filter
0

I know the values are getting to the report because I have two
unbound
text
boxes on the report that are reporting the values from the forms
fields
correctly.

:

When the report opens with no records, ask Access how it is being
filtered.

Assuming a report name of Report1, open the Immediate Window
(Ctrl+G),
and
enter:
? Reports![Report1].Filter
Post a reply showing what comes out.

in
message
Hi Allen

Thanks for your prompt response.
That didn't make any difference sorry.
Yes the field is of date/time and it's format is set to short
date
in
every
reference (the underlying table, the query the report is based
off,
the
form
that drives the report and the report itself).
Any further ideas?

:

Declare the parameters in the query.

In query design view, choose Parameters on the Query menu.
In the dialog, enter 2 rows:
[Forms]![frmReports]![txtStart] Date/Time
[Forms]![frmReports]![txtEnd] Date/Time

We are assuming here that you have this criterion under a
date/time
field.
If it's a Text field in your table, or a calculated field in the
query,
it
may need further help.

"Neill M. Pinkney" <[email protected]>
wrote
in
message
Access 2003 on Windows XP Pro

I have a date field in a query, with the crriteria:-
Between [Forms]![frmReports]!txtStart and
[Forms]![frmReports]!txtEnd

I have a form (frmReports) with two text fields txtStart and
txtEnd
and
a
button to open a report whose data is based on the above
query.

The report will not bring up any results.

If I open the form & run the query I see results. If I put two
unbound
text
boxes on the report to show txtStart & txtStop the values show
the
correct
data.

I have tried making all references to the date (in the table,
in
the
query
on the form) all short date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top