G
Guest
I want to use a query for a subform and a report, but it has duplicate rows.
How can I get rid of the extra rows. We I use the distinct function, it says
"Data type mismatch in criteria expression" Here is the SQL code:
SELECT distinct Proposal_Info.ProposalInfoID, Proposals.ProposalName,
Proposal_Info.[Key?], Proposal_Info.ProposalID, [Resource Type].ResourceType,
Proposal_Info.ResourceID, Proposal_Info.Position, [FirstName] & " " &
[LastName] AS Resource, Proposals.Hiring_Manager, Proposals.Recruiter,
Proposal_Info.Date_Opened, Proposal_Info.Date_Filled,
Workdays(Proposal_Info.Date_Opened,nz(Proposal_Info.Date_Filled,Date())) AS
No_Working_Days, (IIf(IsNull(Proposal_Info.date_filled),'Not Filled','Day(s)
to Fill ')) AS Message
FROM ([Resource Type] RIGHT JOIN Resources ON [Resource Type].ResourceTypeID
= Resources.ResourceType) INNER JOIN ((Proposals INNER JOIN Time_to_Fill ON
Proposals.ProposalID = Time_to_Fill.ProposalID) INNER JOIN Proposal_Info ON
Proposals.ProposalID = Proposal_Info.ProposalID) ON Resources.ResourceID =
Proposal_Info.ResourceID;
Thanks in advance.
How can I get rid of the extra rows. We I use the distinct function, it says
"Data type mismatch in criteria expression" Here is the SQL code:
SELECT distinct Proposal_Info.ProposalInfoID, Proposals.ProposalName,
Proposal_Info.[Key?], Proposal_Info.ProposalID, [Resource Type].ResourceType,
Proposal_Info.ResourceID, Proposal_Info.Position, [FirstName] & " " &
[LastName] AS Resource, Proposals.Hiring_Manager, Proposals.Recruiter,
Proposal_Info.Date_Opened, Proposal_Info.Date_Filled,
Workdays(Proposal_Info.Date_Opened,nz(Proposal_Info.Date_Filled,Date())) AS
No_Working_Days, (IIf(IsNull(Proposal_Info.date_filled),'Not Filled','Day(s)
to Fill ')) AS Message
FROM ([Resource Type] RIGHT JOIN Resources ON [Resource Type].ResourceTypeID
= Resources.ResourceType) INNER JOIN ((Proposals INNER JOIN Time_to_Fill ON
Proposals.ProposalID = Time_to_Fill.ProposalID) INNER JOIN Proposal_Info ON
Proposals.ProposalID = Proposal_Info.ProposalID) ON Resources.ResourceID =
Proposal_Info.ResourceID;
Thanks in advance.