Display parameter criteria, incorrect results

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

Guest

I have a report based on a query with a text box in the Report Header. The
text box control source is: ="From " & [Enter Start Date] & " to " & [Enter
End Date]

It prompts me for both dates and displays the dates entered, but pulls all
dates. The actual field names are Planned_Start and Planned_End. I think I
need to reference these fields in my text box, but not sure how.

Thanks, Mary
 
Does your query depend on these parameter prompts? What is the SQL view of
your query?
 
Yes, although I've tried it with and without the prompts in the query.

Here's how it looks right now:

SELECT [Change Schedule].PLANNED_START_DATE, [Change
Schedule].PLANNED_END_DATE, [Change Schedule].CR_ID, FROM ([Change Schedule]
WHERE ((([Change Schedule].PLANNED_START_DATE) Between [Enter Start Date &&
Time (m/d/yy hh:mm)] And [Enter End Date && Time (m/d/yy hh:mm)]) AND
(([Change Schedule].CR_ID) Not In (0,1)) OR
((([Change Schedule].PLANNED_END_DATE) Between [Enter Start Date && Time
(m/d/yy hh:mm)] And [Enter End Date && Time (m/d/yy hh:mm)]) AND (([Change
Schedule].CR_ID) Not In (0,1))
ORDER BY [Change Schedule].PLANNED_START_DATE,
[Change Schedule].PLANNED_END_DATE
WITH OWNERACCESS OPTION;

I need to be prompted for a specific timeframe, such as 6/3/05 07:00 to
6/3/05 08:00. I need the results to list any activities that fall within
that range. So an activity that starts 6/3/05 02:00 and ends 6/3/05 08:00
should be displayed. The query gives the correct results, but I can't get
what is typed in the box to display in the report header without losing the
accurate results.

Thanks,
Mary

Duane Hookom said:
Does your query depend on these parameter prompts? What is the SQL view of
your query?

--
Duane Hookom
MS Access MVP
--

Mary said:
I have a report based on a query with a text box in the Report Header. The
text box control source is: ="From " & [Enter Start Date] & " to " &
[Enter
End Date]

It prompts me for both dates and displays the dates entered, but pulls all
dates. The actual field names are Planned_Start and Planned_End. I think
I
need to reference these fields in my text box, but not sure how.

Thanks, Mary
 
I think it is a mistake to use parameter prompts and much prefer values
entered into controls on forms.

However, you should be able to add text boxes on the report with control
sources like:
=[Enter Start Date && Time (m/d/yy hh:mm)]
=[Enter End Date && Time (m/d/yy hh:mm)]
--
Duane Hookom
MS Access MVP


Mary said:
Yes, although I've tried it with and without the prompts in the query.

Here's how it looks right now:

SELECT [Change Schedule].PLANNED_START_DATE, [Change
Schedule].PLANNED_END_DATE, [Change Schedule].CR_ID, FROM ([Change
Schedule]
WHERE ((([Change Schedule].PLANNED_START_DATE) Between [Enter Start Date
&&
Time (m/d/yy hh:mm)] And [Enter End Date && Time (m/d/yy hh:mm)]) AND
(([Change Schedule].CR_ID) Not In (0,1)) OR
((([Change Schedule].PLANNED_END_DATE) Between [Enter Start Date && Time
(m/d/yy hh:mm)] And [Enter End Date && Time (m/d/yy hh:mm)]) AND (([Change
Schedule].CR_ID) Not In (0,1))
ORDER BY [Change Schedule].PLANNED_START_DATE,
[Change Schedule].PLANNED_END_DATE
WITH OWNERACCESS OPTION;

I need to be prompted for a specific timeframe, such as 6/3/05 07:00 to
6/3/05 08:00. I need the results to list any activities that fall within
that range. So an activity that starts 6/3/05 02:00 and ends 6/3/05 08:00
should be displayed. The query gives the correct results, but I can't get
what is typed in the box to display in the report header without losing
the
accurate results.

Thanks,
Mary

Duane Hookom said:
Does your query depend on these parameter prompts? What is the SQL view
of
your query?

--
Duane Hookom
MS Access MVP
--

Mary said:
I have a report based on a query with a text box in the Report Header.
The
text box control source is: ="From " & [Enter Start Date] & " to " &
[Enter
End Date]

It prompts me for both dates and displays the dates entered, but pulls
all
dates. The actual field names are Planned_Start and Planned_End. I
think
I
need to reference these fields in my text box, but not sure how.

Thanks, Mary
 
Back
Top