A
Aria
Hi,
I have a school database that among other things tracks keys. I have a
number of key reports and created a new one called rptToday’sRequests. I was
asked to change it so that the room # and location (Stadium, W-101,
Cafeteria, etc.) would appear at the top (key code header) of each key
request. Placing the key code in the header, I think, is the problem.
There are different key codes that will let you gain access to one or a
multitude of sites on campus. If the key request is for a code that opens a
single location, there isn’t a problem. If the request is for a master key
which opens multiple locations, I see repeating data. It shows the first
instance of the location for that key code and then repeats the data for each
additional location without listing the location.
Here is the SQL for the report:
SELECT tblEmployees.EmpID, tblEmployees.EmployeeType, [FirstName] & " " &
[LastName] AS FullName, tblEmployees.FirstName, tblEmployees.LastName,
tblKeysRequests.KeyID, tblKeys.KeyCode, tblKeyLocks.LockID,
tblLocks.Location, tblKeysRequests.RqstDate, tblKeysRequests.QtyRequested,
tblKeysRequests.RcvdDate, tblKeysRequests.QtyRecd, tblKeysRequests.Reason,
sqryRetBldgs.BuildingDescription, sqryRetBldgs.Active
FROM (tblLocks LEFT JOIN sqryRetBldgs ON tblLocks.BuildingID =
sqryRetBldgs.BuildingID) INNER JOIN ((tblKeys INNER JOIN tblKeyLocks ON
tblKeys.KeyID = tblKeyLocks.KeyID) INNER JOIN (tblEmployees INNER JOIN
tblKeysRequests ON tblEmployees.EmpID = tblKeysRequests.EmpID) ON
tblKeys.KeyID = tblKeysRequests.KeyID) ON tblLocks.LockID = tblKeyLocks.LockID
WHERE (((tblEmployees.EmployeeType)<>2) AND
((tblKeysRequests.RqstDate)=Date()) AND ((tblKeysRequests.RcvdDate) Is Null)
AND ((sqryRetBldgs.Active)=True))
ORDER BY tblEmployees.LastName, tblKeys.KeyCode;
Sorting & Grouping:
Keycode Ascending
Group Header Yes
Group Footer No
Group On Each Value
Group Interval 1
Keep Together With First Detail
RqstDate
I realize it’s because there are separate location instances and it’s
working the way it should *but*, I was hoping someone knew of a way I could
work around this. I don’t need to see 3 pages of the same information and
only 1 key requested. Thank you so much.
I have a school database that among other things tracks keys. I have a
number of key reports and created a new one called rptToday’sRequests. I was
asked to change it so that the room # and location (Stadium, W-101,
Cafeteria, etc.) would appear at the top (key code header) of each key
request. Placing the key code in the header, I think, is the problem.
There are different key codes that will let you gain access to one or a
multitude of sites on campus. If the key request is for a code that opens a
single location, there isn’t a problem. If the request is for a master key
which opens multiple locations, I see repeating data. It shows the first
instance of the location for that key code and then repeats the data for each
additional location without listing the location.
Here is the SQL for the report:
SELECT tblEmployees.EmpID, tblEmployees.EmployeeType, [FirstName] & " " &
[LastName] AS FullName, tblEmployees.FirstName, tblEmployees.LastName,
tblKeysRequests.KeyID, tblKeys.KeyCode, tblKeyLocks.LockID,
tblLocks.Location, tblKeysRequests.RqstDate, tblKeysRequests.QtyRequested,
tblKeysRequests.RcvdDate, tblKeysRequests.QtyRecd, tblKeysRequests.Reason,
sqryRetBldgs.BuildingDescription, sqryRetBldgs.Active
FROM (tblLocks LEFT JOIN sqryRetBldgs ON tblLocks.BuildingID =
sqryRetBldgs.BuildingID) INNER JOIN ((tblKeys INNER JOIN tblKeyLocks ON
tblKeys.KeyID = tblKeyLocks.KeyID) INNER JOIN (tblEmployees INNER JOIN
tblKeysRequests ON tblEmployees.EmpID = tblKeysRequests.EmpID) ON
tblKeys.KeyID = tblKeysRequests.KeyID) ON tblLocks.LockID = tblKeyLocks.LockID
WHERE (((tblEmployees.EmployeeType)<>2) AND
((tblKeysRequests.RqstDate)=Date()) AND ((tblKeysRequests.RcvdDate) Is Null)
AND ((sqryRetBldgs.Active)=True))
ORDER BY tblEmployees.LastName, tblKeys.KeyCode;
Sorting & Grouping:
Keycode Ascending
Group Header Yes
Group Footer No
Group On Each Value
Group Interval 1
Keep Together With First Detail
RqstDate
I realize it’s because there are separate location instances and it’s
working the way it should *but*, I was hoping someone knew of a way I could
work around this. I don’t need to see 3 pages of the same information and
only 1 key requested. Thank you so much.