T
Twee
Hi all,
I am new to Access and am having problems because I am writing a nested iif
statement that has 15 conditions, which I believe, not only exceeds the limit
of nested if allowed but also probably indicative that my approach is not the
best way to do things.
In a query, here is what my if statement did in the DX order column:
iif(len([Dx code 1]>1,"1",iif(len([Dx code 2]>1,"2","3")). Unfortunately, the
only way to tell the order of the diagnosis is by those columns called Dx
Code 1, Dx Code 2...Dx Code 15
If I had only three diagnosis, it would work out great but each patient has
about 15 diagnosis so my nested if statements would look crazy.
Patient Name Dx Code Dx code 1 Dx code 2 Dx code 3 Dx Order
Patient 1 511 0511
2
Patient 1 0811 0811
3
Patient 1 0528 528
1
Can anyone help me with alternatives? I am very new to VBA codes but would
be willing to try it. Thank you so much!!
I am new to Access and am having problems because I am writing a nested iif
statement that has 15 conditions, which I believe, not only exceeds the limit
of nested if allowed but also probably indicative that my approach is not the
best way to do things.
In a query, here is what my if statement did in the DX order column:
iif(len([Dx code 1]>1,"1",iif(len([Dx code 2]>1,"2","3")). Unfortunately, the
only way to tell the order of the diagnosis is by those columns called Dx
Code 1, Dx Code 2...Dx Code 15
If I had only three diagnosis, it would work out great but each patient has
about 15 diagnosis so my nested if statements would look crazy.
Patient Name Dx Code Dx code 1 Dx code 2 Dx code 3 Dx Order
Patient 1 511 0511
2
Patient 1 0811 0811
3
Patient 1 0528 528
1
Can anyone help me with alternatives? I am very new to VBA codes but would
be willing to try it. Thank you so much!!