Microsoft
Software
Hardware
Network
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
Random Solutions
Help Displaying Message on Correct Child Form in MDI Parent
Run Chkdsk from bootable flash drive
Comparing text documents (originally HTML docs, but saved to text files)
MS Access Report Hide\Display a textbox or label
COM 80040154 Error, CLSID not in the Registery, DLL Made with visual foxpro.
Open combobox programmatically
How do I Write a VB app to execute a stored procedure and a Crystal Report
How to allow Non-Administrator to manage IIS
Domain account gets locked very frequently.
Watermark