SELECT tblSoftware.Description, tblLicenseDetails.LicenseKey, tblLicenseDetails.NumOfLicensePurch, Nz([SumOfNumberOfLicences],0) AS [License Allocation], nz(([NumOfLicensePurch]-[SumOfNumberOfLicences]),[NumofLicensePurch]) AS [License Available]
FROM (tblSoftware LEFT JOIN qryALLOCATIONS_LICENSE ON tblSoftware.SoftwareId = qryALLOCATIONS_LICENSE.SoftwareId) INNER JOIN tblLicenseDetails ON tblSoftware.SoftwareId = tblLicenseDetails.SoftwareID
GROUP BY tblSoftware.Description, tblLicenseDetails.LicenseKey, tblLicenseDetails.NumOfLicensePurch;