MS Access Concatenate – Omit Space and Comma if First Value is Missing

concatgroup-concatenationms accessreporting

I am concatenating 2 values in a MS Access Report: "Method" and "Experiment" and they are to be separated by a comma (,).

I have figured out how to concatenate succesfully when the second value is missing (Experiment), but I am struggling to omit a blank space and comma if the first value ("Method") is missing.

The code I am using is:
=([Method] & (", "+[Experiment]))

An example of my table
What I would like to obtain is:

  1. Harvard, Mixed sequence
  2. Intensity
  3. Bradford

Best Answer

Thank you Akina for your suggestion.

As I am really a newbie, it took me some time to work out how to use IFF.

At the end here's the working string to remove comma and space at the beginning if the first value is null (empty):

=([Method].value) & iif (IsNull([Method].value) ,"",", ") & + [Experiment]