J
Jen
I am trying to create a report that shows information on people assigned to
projects. They can be assigned either as the Assignee or as the Originator of
the project. I have one query that contains the project info (including both
the Assignee and Originator fields). The report is opened from a switchboard,
and the user selects a name from a drop-down list.
Previously, I just wanted the report to show the projects for which the
selected person is the Assignee - that worked great, and my code was as
follows:
DoCmd.OpenReport "Workload", acViewPreview, , "Assignee = '" &
Me!cboAssignee & "'"
Now that I also want to show the projects for which the selected person is
the Originator, I'm thinking I just need an OR statement at the
end...something like this:
DoCmd.OpenReport "Workload", acViewPreview, , "Assignee = '" &
Me!cboAssignee & "'" Or "Originator = '" & Me!cboAssignee & "'"
However, when I try to run this I get a type mismatch error. Ack!
Any suggestions? Can I not use the OR with the WHERE statement in the
OpenReport method?
projects. They can be assigned either as the Assignee or as the Originator of
the project. I have one query that contains the project info (including both
the Assignee and Originator fields). The report is opened from a switchboard,
and the user selects a name from a drop-down list.
Previously, I just wanted the report to show the projects for which the
selected person is the Assignee - that worked great, and my code was as
follows:
DoCmd.OpenReport "Workload", acViewPreview, , "Assignee = '" &
Me!cboAssignee & "'"
Now that I also want to show the projects for which the selected person is
the Originator, I'm thinking I just need an OR statement at the
end...something like this:
DoCmd.OpenReport "Workload", acViewPreview, , "Assignee = '" &
Me!cboAssignee & "'" Or "Originator = '" & Me!cboAssignee & "'"
However, when I try to run this I get a type mismatch error. Ack!
Any suggestions? Can I not use the OR with the WHERE statement in the
OpenReport method?