Good day everyone.
BTW - thanks to ALL who have helped me with my first Access project. Especially ANDREW!!!!
Just a quick one - missing the right syntax I guess.
I have a report with a TXT box that builds a name from the surtitle, first, last...fields in the table
My IF statement works perfectly - except...the SurTitle and Accr are lookups in the table and are set as a number field so...
the result of the statement is "10 Bob Smith 5," rather than "Mr. Bob Smith M.A.Sc.,P. Eng.,"
I tried adding "=IIf(IsNull([Prime_ContactSurTitle]),"",[Prime_ContactSurTitle AS xyz_ID_xyz, [SurTitle] AS xyz_DispExpr_xyz] & " ")..."
Am I close?
Can anyone tell me what the right syntax is to get the fields to show as it's text lookup?
CODE:
=IIf(IsNull([Prime_ContactSurTitle]),"",[Prime_ContactSurTitle] & " ") & IIf(IsNull([Prime_ContactFirstName]),"",[Prime_ContactFirstName] & " ") & IIf(IsNull([Prime_ContactLastName]),"",[Prime_ContactLastName] & " ") & IIf(IsNull([Prime_ContactAccr]),"",[Prime_ContactAccr] & ",")
BTW - thanks to ALL who have helped me with my first Access project. Especially ANDREW!!!!
Just a quick one - missing the right syntax I guess.
I have a report with a TXT box that builds a name from the surtitle, first, last...fields in the table
My IF statement works perfectly - except...the SurTitle and Accr are lookups in the table and are set as a number field so...
the result of the statement is "10 Bob Smith 5," rather than "Mr. Bob Smith M.A.Sc.,P. Eng.,"
I tried adding "=IIf(IsNull([Prime_ContactSurTitle]),"",[Prime_ContactSurTitle AS xyz_ID_xyz, [SurTitle] AS xyz_DispExpr_xyz] & " ")..."
Am I close?
Can anyone tell me what the right syntax is to get the fields to show as it's text lookup?
CODE:
=IIf(IsNull([Prime_ContactSurTitle]),"",[Prime_ContactSurTitle] & " ") & IIf(IsNull([Prime_ContactFirstName]),"",[Prime_ContactFirstName] & " ") & IIf(IsNull([Prime_ContactLastName]),"",[Prime_ContactLastName] & " ") & IIf(IsNull([Prime_ContactAccr]),"",[Prime_ContactAccr] & ",")