By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,784 Members | 3,536 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,784 IT Pros & Developers. It's quick & easy.

Report Trouble

P: n/a
I currently have a form "VIEW ALL ASSIGNMENTS" containing a subform
with record source "qryVIEWALLASSIGNMENTS. This query filters the
database based on two combo boxes on the form containing dates ([DATE1]
& [DATE2])

The idea is: "Please show me all assignments from [DATE1] through
[DATE2].

Here is my SQL Code for that:

SELECT ProjectInformation.EventType, ProjectInformation.ProjectName,
ProjectInformation.ProjectDescription,
ProjectInformation.ProjectStartDate, ProjectInformation.ProjectEndDate,
ProjectInformation.Status, ProjectInformation.ProjectOwner,
Sum(HoursWorked.HoursWorked) AS SumOfHoursWorked
FROM HoursWorked INNER JOIN ProjectInformation ON
HoursWorked.ProjectName = ProjectInformation.ProjectName
GROUP BY ProjectInformation.EventType, ProjectInformation.ProjectName,
ProjectInformation.ProjectDescription,
ProjectInformation.ProjectStartDate, ProjectInformation.ProjectEndDate,
ProjectInformation.Status, ProjectInformation.ProjectOwner
HAVING (((ProjectInformation.ProjectStartDate)>=[DATE1] And
(ProjectInformation.ProjectStartDate)<=[DATE2]))
ORDER BY ProjectInformation.ProjectStartDate,
ProjectInformation.Status, ProjectInformation.ProjectOwner;

The form and query work great! Now I am trying to create a "Printer
Friendly" report of the same information. However, when I try to
"Preview" the report, it creates a pop-up box asking for [DATE1] and
[DATE2]. For lack of words, it seems the report is not referencing
[DATE1] and [DATE2] in the query which is not referencing [DATE1] and
[DATE2] in the form.

Any suggestions would be greatly appreciated!

Feb 7 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Gox
dr******@gmail.com wrote:
I currently have a form "VIEW ALL ASSIGNMENTS" containing a subform
with record source "qryVIEWALLASSIGNMENTS. This query filters the
database based on two combo boxes on the form containing dates ([DATE1]
& [DATE2])

The idea is: "Please show me all assignments from [DATE1] through
[DATE2].

Here is my SQL Code for that:

SELECT ProjectInformation.EventType, ProjectInformation.ProjectName,
ProjectInformation.ProjectDescription,
ProjectInformation.ProjectStartDate, ProjectInformation.ProjectEndDate,
ProjectInformation.Status, ProjectInformation.ProjectOwner,
Sum(HoursWorked.HoursWorked) AS SumOfHoursWorked
FROM HoursWorked INNER JOIN ProjectInformation ON
HoursWorked.ProjectName = ProjectInformation.ProjectName
GROUP BY ProjectInformation.EventType, ProjectInformation.ProjectName,
ProjectInformation.ProjectDescription,
ProjectInformation.ProjectStartDate, ProjectInformation.ProjectEndDate,
ProjectInformation.Status, ProjectInformation.ProjectOwner
HAVING (((ProjectInformation.ProjectStartDate)>=[DATE1] And
(ProjectInformation.ProjectStartDate)<=[DATE2]))
ORDER BY ProjectInformation.ProjectStartDate,
ProjectInformation.Status, ProjectInformation.ProjectOwner;

The form and query work great! Now I am trying to create a "Printer
Friendly" report of the same information. However, when I try to
"Preview" the report, it creates a pop-up box asking for [DATE1] and
[DATE2]. For lack of words, it seems the report is not referencing
[DATE1] and [DATE2] in the query which is not referencing [DATE1] and
[DATE2] in the form.

Any suggestions would be greatly appreciated!


Instead [DATE1] use:
Forms![VIEW ALL ASSIGNMENTS]![DATE1]

and analogous:

Forms![VIEW ALL ASSIGNMENTS]![DATE2]

--
Gox
Feb 7 '06 #2

P: n/a
Which [DATE1] should be edited? In the Query?

Feb 7 '06 #3

P: n/a
Nevermind, I got that to work.

Here is something I would like to ADD. What if I want to further
filter by a ComboBox [CurrentUser]?

I tried the same logic, but will not work

Feb 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.