I built a test field in an Access query that isn't displaying the output desired. In the field line of the query, I entered the following:
Test:
IIf([Ai1] Is Not Null,[Ai1]
& Chr(13) & Chr(10) &
IIf([Ai2] Is Not Null,[Ai2]
& Chr(13) & Chr(10) &
IIf([Ai3] Is Not Null,[Ai3]
& Chr(13) & Chr(10) &
IIf([Ai4] Is Not Null,[Ai4]
& Chr(13) & Chr(10) &
IIf([Ai5] Is Not Null,[Ai5]
& Chr(13) & Chr(10) &
IIf([Ai6] Is Not Null,[Ai6]))))))
As long as Ai1 thru Ai6 are populated, the Test field displays the desired results. But of Ai1 and Ai6 are populated and nothing in between, then the Test field will display the Ai1 output, but not Ai6.
Let's assume that the below is true:
Ai1 = Output 1
Ai2 = Output 2
Ai3 = Output 3
Ai4 = Output 4
Ai5 = Output 5
Ai6 = Output 6
The results of the query would be:
Output 1
Output 2
Output 3
Output 4
Output 5
Output 6
Now let's assume this is true:
Ai1 = Output 1
Ai2 = Null
Ai3 = Null
Ai4 = Null
Ai5 = Null
Ai6 = Output 6
The results of the query is:
Output 1
How do I change the field expression so that the results display ALL the Ai fields that apply? In the last example, the results should be:
Output 1
Output 6
Novice level at best, so my understanding is limited.
Thanks in advance!