Hi everyone! I am new to Access and just starting to learn the SQL language. I am trying to run a query with a TRANSFORM Nz function so that if a query I run yields a null result it will produce "0" instead (I am using a count in the query). I have read up as much as I can on this but still cannot get my query to function. I've seen people yield a 0 for a null count in many different types of ways, none of which worked for me. I will post my code to see if anyone could help me. I would appreciate any insight you may have and any advice you can give me. Thank you!
TRANSFORM Nz(Count(AuditStatus.[UniqueAuditID*]),0)
SELECT Count(AuditStatus.[UniqueAuditID*]) AS [CountOfUniqueAuditID*], StatusType.StatusType, [AuditTypes(GCP,PV,GLP)].AuditType
FROM StatusType INNER JOIN ([AuditTypes(GCP,PV,GLP)] INNER JOIN (AuditStatus INNER JOIN AuditByType ON AuditStatus.[UniqueAuditID*] = AuditByType.AuditS_ID) ON [AuditTypes(GCP,PV,GLP)].ID = AuditByType.AuditType_ID) ON StatusType.ID = AuditStatus.Status_ID
GROUP BY StatusType.StatusType, [AuditTypes(GCP,PV,GLP)].AuditType
HAVING (((StatusType.StatusType)="postponed") AND (([AuditTypes(GCP,PV,GLP)].AuditType)="GLP"));
Not sure if this is relevant but the asterisk in UniqueAuditID* field is apart of the name.