Duplicate output alias 'Expr1'

coperations07
coperations07 used Ask the Experts™
on
Hi,
I'm using access 2000.
I'm working on debugging a program that someone else created and it is frying my brain.
I'm getting an error that says Duplicate output alias 'Expr1'. I've tracked the error down to the attached code, but I'm not sure what is wrong.  
SELECT [T_Employee].[Employee Number], 
[T_Employee].[Employee Status], 

[T_Employee].[Employee First Name], [T_Employee].[Employee Last Name], 

IIf([FMLAnotOTDThoursWorkedSum]![SumOfDays/Hours Leave] Is 

Null,0,[FMLAnotOTDThoursWorkedSum]![SumOfDays/Hours Leave]) AS HoursOut, 

IIf([FMLAOTDThoursWorkedSum]![SumOfDays/Hours Leave] Is 

Null,0,[FMLAOTDThoursWorkedSum]![SumOfDays/Hours Leave]) AS HoursOTDT, 

IIf([FMLASumFMused]!FMLABalance Is Null,IIf([T_Employee]![Employee 

Status]='F',480,350),[FMLASumFMused]!FMLABalance) AS HoursFMLAbalance, 

[FMLAHoursWorkedSummary].[SumOfTHours] AS HoursWorked, [FMLA Date]-364 AS Expr3, [FMLA 

Date] AS Expr4

FROM FMLAOTDThoursWorkedSum, FMLASumFMused, FMLAHoursWorkedSummary, 

FMLAnotOTDThoursWorkedSum INNER JOIN T_Employee ON [FMLAnotOTDThoursWorkedSum].[Employee 

Number]=[T_Employee].[Employee Number]

WHERE ((([T_Employee].[Employee Number])=[EmployeeNumber]))

WITH OWNERACCESS OPTION;

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
if any of these is a query

FMLAOTDThoursWorkedSum,
FMLASumFMused,
FMLAHoursWorkedSummary,

FMLAnotOTDThoursWorkedSum

inspect the SQL statement.
HainKurtSr. System Analyst
Commented:
run these queries

select * from FMLAOTDThoursWorkedSum
select * from FMLASumFMused
select * from FMLAHoursWorkedSummary
select * from FMLAnotOTDThoursWorkedSum
select * from T_Employee

and check column names for Expr1 and fix it...

Author

Commented:
Thanks guys that got me through this error. I came up w/ another one now, but I will repost for it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial