Hi
I am doing an MSquery linking into an access databse to link into an excel spradsheet.
An example databse as 37 records in all, all connceted to mulitple tables. when I add a table called Vlistcomponants the link then just shows 5 records. I am assuming this is because only 5 matching records have data in the vlistcomponant and the other 32 have nothing in it.
I need to show all 37 records, I ahve tried to change the Join types but it says I cannot have the other join types as there are to many in the query.
Here is the SQL code that works so far (see below). Any idea's how I can add the table in and see all 37 records. Thanks
SELECT TableSites.SiteName, TableSites.SiteAddr1, TableSites.SiteSurveyorsName, TableSamples.SampleDate, TableSamples.SampleSurveyType, VListComponents.ItemValue, VListAreas.ItemValue, VListFloors.ItemValue, TableSamples.SampleRoom
FROM TableSamples TableSamples, TableSites TableSites, VListAreas VListAreas, VListComponents VListComponents, VListFloors VListFloors
WHERE TableSamples.SampleAreaID = VListAreas.ID AND TableSamples.SampleFloorID = VListFloors.ID AND TableSamples.SampleSiteID = TableSites.SiteID AND TableSamples.SampleComponentID = VListComponents.ID
ORDER BY TableSamples.SampleDate
I am doing an MSquery linking into an access databse to link into an excel spradsheet.
An example databse as 37 records in all, all connceted to mulitple tables. when I add a table called Vlistcomponants the link then just shows 5 records. I am assuming this is because only 5 matching records have data in the vlistcomponant and the other 32 have nothing in it.
I need to show all 37 records, I ahve tried to change the Join types but it says I cannot have the other join types as there are to many in the query.
Here is the SQL code that works so far (see below). Any idea's how I can add the table in and see all 37 records. Thanks
SELECT TableSites.SiteName, TableSites.SiteAddr1, TableSites.SiteSurveyorsName, TableSamples.SampleDate, TableSamples.SampleSurveyType, VListComponents.ItemValue, VListAreas.ItemValue, VListFloors.ItemValue, TableSamples.SampleRoom
FROM TableSamples TableSamples, TableSites TableSites, VListAreas VListAreas, VListComponents VListComponents, VListFloors VListFloors
WHERE TableSamples.SampleAreaID = VListAreas.ID AND TableSamples.SampleFloorID = VListFloors.ID AND TableSamples.SampleSiteID = TableSites.SiteID AND TableSamples.SampleComponentID = VListComponents.ID
ORDER BY TableSamples.SampleDate