B
BobC
I have 4 linked tables in Access 2007. 3 fo the tables contain a notes
field (SiteNotes, GroupNotes and EquipmentNotes. I want to create a
report that lists all notes. When I created an associated query I
cannot get it to be unique (it list multiple records that are identical.
The SQL is:
SELECT DISTINCT LocationTBL.LocationNumber, SiteTBL.SiteNumber,
SiteTBL.SiteNotes, CategoryGroupingTBL.GroupNotes,
EquipmentTBL.EquipmentNotes
FROM (LocationTBL INNER JOIN SiteTBL ON LocationTBL.ID =
SiteTBL.LocationID) INNER JOIN (CategoryGroupingTBL INNER JOIN
EquipmentTBL ON CategoryGroupingTBL.ID = EquipmentTBL.GroupID) ON
SiteTBL.ID = CategoryGroupingTBL.SiteID
WHERE (((EquipmentTBL.EquipmentNotes)<>"" And
(EquipmentTBL.EquipmentNotes) Is Not Null)) OR
(((CategoryGroupingTBL.GroupNotes)<>"" And
(CategoryGroupingTBL.GroupNotes) Is Not Null)) OR
(((SiteTBL.SiteNotes)<>"" And (SiteTBL.SiteNotes) Is Not Null));
If I cut out 1 of the fields it becomes unique. I assume it is too
complex? Is there a better way to do this?
field (SiteNotes, GroupNotes and EquipmentNotes. I want to create a
report that lists all notes. When I created an associated query I
cannot get it to be unique (it list multiple records that are identical.
The SQL is:
SELECT DISTINCT LocationTBL.LocationNumber, SiteTBL.SiteNumber,
SiteTBL.SiteNotes, CategoryGroupingTBL.GroupNotes,
EquipmentTBL.EquipmentNotes
FROM (LocationTBL INNER JOIN SiteTBL ON LocationTBL.ID =
SiteTBL.LocationID) INNER JOIN (CategoryGroupingTBL INNER JOIN
EquipmentTBL ON CategoryGroupingTBL.ID = EquipmentTBL.GroupID) ON
SiteTBL.ID = CategoryGroupingTBL.SiteID
WHERE (((EquipmentTBL.EquipmentNotes)<>"" And
(EquipmentTBL.EquipmentNotes) Is Not Null)) OR
(((CategoryGroupingTBL.GroupNotes)<>"" And
(CategoryGroupingTBL.GroupNotes) Is Not Null)) OR
(((SiteTBL.SiteNotes)<>"" And (SiteTBL.SiteNotes) Is Not Null));
If I cut out 1 of the fields it becomes unique. I assume it is too
complex? Is there a better way to do this?