I changed it to mcalex suggestion - still got invalid syntax
IIF(Not IsNull([CourtRefNo]) Or Len([CourtRefNo]) > 0, "Court - " & [CourtLocation] & " - " & [CourtRefNo], IIF(IsNull([QcatRefNo]) Or Len([QcatRefNo]) = 0," ", "QCAT - " [QcatLocation] & " - " & [QcatRefNo]))