I have a query (built by another coder) which uses the windows environmental variable to record who is currently logged into the database.
The query has within the criteria the following statement under EmployeeID field. "DLookUp("ID","tblEmployees","Winlogin = '" & fUsername() & "'")" so is displaying records associated with that employee who match the WinLogin field (who is logged in on windows).
The tblEmployees also has a "Department" fields which is the department the employee is part of. What I'm trying to achieve is to list all records for the department that the logged in user is part of, not just their records.
Any assistance would be greatly appreciated.