betachristopher
Programmer
i have this variable in a query:
so if firstName = John and lastName = Doe and degree = MD, the doctor name should be listed as "John Doe, MD".
if the degree is null, the doctor name should be listed as "John Doe".
simple enough...but...
i have two queries that do this and they work fine. i have a third query that joins these two queries because i only want the results that exist in both queries. again, the doctor names are listed correctly in this third query.
but when i create a report using this third query, i get names with no degree displayed as "John Doe, ". i have tried several things like using completely different table and field names between the two main queries, i have tried several different ways of saying null like IIf(Nz(Staff.degree), IIf(IsNull(Staff.degree), IIf(Staff.degree Is Null,.
what can i do differently?
Code:
Physician: (Staff.firstName & " " & Staff.lastName & IIf(Nz(Staff.degree),", " & Staff.degree,""))
so if firstName = John and lastName = Doe and degree = MD, the doctor name should be listed as "John Doe, MD".
if the degree is null, the doctor name should be listed as "John Doe".
simple enough...but...
i have two queries that do this and they work fine. i have a third query that joins these two queries because i only want the results that exist in both queries. again, the doctor names are listed correctly in this third query.
but when i create a report using this third query, i get names with no degree displayed as "John Doe, ". i have tried several things like using completely different table and field names between the two main queries, i have tried several different ways of saying null like IIf(Nz(Staff.degree), IIf(IsNull(Staff.degree), IIf(Staff.degree Is Null,.
what can i do differently?