cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
brodiemac2
Champion Sweeper
I'm trying to modify some of the pre-built reports on Users to only look in specific OU so I don't get reports filled with all the superfluous built-in accounts in AD. This is what I have but it's not working properly. Any help is appreciated.
Select Top 1000000 Case
When tblADusers.Displayname Is Null Or
tblADusers.Displayname = '' Then tblADusers.Userdomain + '\' +
tblADusers.Username
Else tblADusers.Displayname
End As Displayname,
tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Department,
'usersm.gif' As icon,
tblADusers.IsEnabled As EnabledInAD,
tblADusers.Lastchanged,
tblADusers.OU
From tblADusers
Where (tblADusers.Department Like '' Or tblADusers.Department Is Null) And
(tblADComputers.OU =
'OU=Location,OU=Users,DC=company,DC=com') Or
(tblADComputers.OU =
'OU=Location,OU=Users,DC=company,DC=com'))
Order By Displayname
0 REPLIES 0