|
Question : Fill a Text box with a selection
|
|
I have a table which store letters that represent various industry types.
I have a list of associated industry types.
On a report I want a text box beside a letter to show the related Industry Type.
eg A Agriculture B Mining etc
Not all categories will be on the report. The Report comes from a query which groups by industry letter and count how many in each category.
The Field in the Table is called [Industry Letter]
I tried using an iif statment but it was too complex for access.
I have had a try at the following Select Case in a module but it returns nothing in the text box when I call the fuction
=Name([IndustryLetter])
Function Name(IndustryName) Select Case IndustryName Case "A" IndustryName = "Agriculture" Case "B" IndustryName = "Mining" Case "C" IndustryName = "Manufacturing" Case "D" IndustryName = "Electricity, Gas & Water Supply" Case "E" IndustryName = "Construction" Case "F" IndustryName = "Wholesale Trade" Case "G" IndustryName = "Retail Trade" Case "H" IndustryName = "Accommodation, Cafes & Restaurants" Case "I" IndustryName = "Transport & Storage" Case "J" IndustryName = "Communication Services" Case "K" IndustryName = "Finance & Insurance" Case "L" IndustryName = "Property & Business Services" Case "M" IndustryName = "Government Administration & Defence" Case "N" IndustryName = "Education" Case "O" IndustryName = "Health & Community Services" Case "P" IndustryName = "Cultural & Recreational Services" Case "Q" IndustryName = "Personal & Other Services" End Select End Function
Am I on the right track.
Thanks Neil
|
|
Answer : Fill a Text box with a selection
|
|
nmilmine,
I'm glad we got on the same wavelength there. ;-) I would have gotten back to you myself for firther clarification but I was at a Cub Scout pack meeting. ;-)
lmerrell
|
|
|