J
Jean
Hi all,
I am trying to get this query right, but so far no joy...
I have written the following code in the Field box of the
QBD grid of a query:
firstvalue:IIf(Not (IsNull([Value1])),[Value1],(IIf(Not
(IsNull([Value2])),[Value2],(IIf(Not (IsNull([Value3])),
[Value3],[Value4])))))
What I actually want in field "firstvalue" is the left
most value of Value1, Value2, Value3 and Value4. E.g If
for a record Value1 = 0 (or NULL), then it must return
Value2 or Value3 or Value4, depending on the first one
which is not 0 (or NULL).
I keep getting syntax errors, and specifically pointing to
the first comma in the code.
Can somebody please tell me what is wrong? I can email a
sample DB to someone if they want to check out the table
which the query is based on.
Thanks a bunch, in advance!
JP
I am trying to get this query right, but so far no joy...
I have written the following code in the Field box of the
QBD grid of a query:
firstvalue:IIf(Not (IsNull([Value1])),[Value1],(IIf(Not
(IsNull([Value2])),[Value2],(IIf(Not (IsNull([Value3])),
[Value3],[Value4])))))
What I actually want in field "firstvalue" is the left
most value of Value1, Value2, Value3 and Value4. E.g If
for a record Value1 = 0 (or NULL), then it must return
Value2 or Value3 or Value4, depending on the first one
which is not 0 (or NULL).
I keep getting syntax errors, and specifically pointing to
the first comma in the code.
Can somebody please tell me what is wrong? I can email a
sample DB to someone if they want to check out the table
which the query is based on.
Thanks a bunch, in advance!
JP