Choose Function with a table. Within MS Access 2003
Is it reasonably possible (without extensive coding) to somehow utilize a lookup table with a CHOOSE () function instead of coding separate comma and quote separated text?
What I am attempting to do is to avoid writing and maintaining long character strings within several CHOOSE functions e.g. 2 - 24 choices within an option group? I am only working with subreports that are to be printed within a regular report.
Assuming there are no limits to the length of the string or number of characters within a function, such a function could be hard-coded into a query.
However, such code would be much easier to maintain with various lookup tables e.g. tables of 1...n sequential numbers with the appropriate option text.
I have looked online, in this forum and in several “Access bibles” and have found nothing with any detail other than a single undetailed reference suggesting it could be done without any suggestions as to how to actually do it.
Any helpful generalized hints or “example” code would be great. I would prefer to utilize a lookup table within a query, but if necessary would find code utilizing SQL or VBA helpful.
Thanks in advance for any and all assistance.
K Roger