Ihave the following expression in the QBE grid:
Facility: Switch(Val([PUB_PSHISTOR]![PSH-TC]) Between 1770 And 1776 Or Val([PUB_PSHISTOR]![PSH-TC]) Between 1500 And 1519 Or Val([PSH-TC])=1583,"Range",Val([PSH-TC]) Between 1001 And 1301,"WPGC",Val([PSH-TC]) Between 1520 And 1524,"Cages",Val([PSH-TC]) Between 1531 And 1536,"MiniGolf",Val([PSH-TC])=1537 Or Val([PSH-TC]) Between 1580 And 1582 Or Val([PSH-TC]) Between 1700 And 1710 Or Val([PSH-TC]) Between 1901 And 1922,"Misc",Val([PSH-TC]) Between 1600 And 1615,"lessons",Val([PUB_PSCODES]![PSC-TC])=1598,"SSP Cash Over",Val([PUB_PSCODES]![PSC-TC])=1599,"SSP Cash Short",Val([PUB_PSCODES]![PSC-TC])=1298,"Golf Cash Over",Val([PUB_PSCODES]![PSC-TC])=1299,"Golf Cash Short")
There are 10 "trancodes" that I am trying to give names for use in a pivot table. Initially I was using IIF but learned that there is a limit of 7 in an expression. I changed to Switch because there is no limit. With IIF I never got values for the last few elements. However I get the same result using Switch. Running Switch with just the missing elements gives me a good answer, so I'm thinking there is another limit. I can solve the problem by building a table but that has a whole new set of obstacles.
Thanks for the help in advance
jpl
Facility: Switch(Val([PUB_PSHISTOR]![PSH-TC]) Between 1770 And 1776 Or Val([PUB_PSHISTOR]![PSH-TC]) Between 1500 And 1519 Or Val([PSH-TC])=1583,"Range",Val([PSH-TC]) Between 1001 And 1301,"WPGC",Val([PSH-TC]) Between 1520 And 1524,"Cages",Val([PSH-TC]) Between 1531 And 1536,"MiniGolf",Val([PSH-TC])=1537 Or Val([PSH-TC]) Between 1580 And 1582 Or Val([PSH-TC]) Between 1700 And 1710 Or Val([PSH-TC]) Between 1901 And 1922,"Misc",Val([PSH-TC]) Between 1600 And 1615,"lessons",Val([PUB_PSCODES]![PSC-TC])=1598,"SSP Cash Over",Val([PUB_PSCODES]![PSC-TC])=1599,"SSP Cash Short",Val([PUB_PSCODES]![PSC-TC])=1298,"Golf Cash Over",Val([PUB_PSCODES]![PSC-TC])=1299,"Golf Cash Short")
There are 10 "trancodes" that I am trying to give names for use in a pivot table. Initially I was using IIF but learned that there is a limit of 7 in an expression. I changed to Switch because there is no limit. With IIF I never got values for the last few elements. However I get the same result using Switch. Running Switch with just the missing elements gives me a good answer, so I'm thinking there is another limit. I can solve the problem by building a table but that has a whole new set of obstacles.
Thanks for the help in advance
jpl