mikemalek@cablelynx.
New member
- Local time
- Today, 03:28
- Joined
- Mar 24, 2012
- Messages
- 6
I have fields Name1, Groups1, Name2, Groups2, and L-Name. Groups1 and Groups2 are identical dropdown lists where a single letter (e.g. "A") is selected in clicking in the appropriate box. This finds all Name1 and Name2 entries that have "A" selected; sometimes it is both, sometimes only Name1, sometimes only Name2. Name1 is never empty; sometimes Name2 is. Query works correctly.
Problem: I need an address label where the addressee contains Name1 and/or Name2 + L-name when letter "A" is checked. For example, if Name1 and Name2 of the same record have A's checked in Groups1 and Groups2, the label would be Name1 + sp + Name2 + space + L-name. If Name1 is empty but Name2 of the same record is returned in the query, the label would be: Name2 + sp + L-Name. If Name2 is empty and Name1 returns, the label would be: Name1 + sp + L-Name.
This is what I have tried (unsuccessfully):
=IIF(([Name1] IsNotNull & IIF[Name2] ISNotNull, [Name1] & " " [Name2] & " " & [L-Name]) , IIF([Name1] IsNull, [Name2] & " " & [L-Name], [Name1] & " " & [L-Name]))
Problem: I need an address label where the addressee contains Name1 and/or Name2 + L-name when letter "A" is checked. For example, if Name1 and Name2 of the same record have A's checked in Groups1 and Groups2, the label would be Name1 + sp + Name2 + space + L-name. If Name1 is empty but Name2 of the same record is returned in the query, the label would be: Name2 + sp + L-Name. If Name2 is empty and Name1 returns, the label would be: Name1 + sp + L-Name.
This is what I have tried (unsuccessfully):
=IIF(([Name1] IsNotNull & IIF[Name2] ISNotNull, [Name1] & " " [Name2] & " " & [L-Name]) , IIF([Name1] IsNull, [Name2] & " " & [L-Name], [Name1] & " " & [L-Name]))
Last edited: