Option Group with Text

DBFIN

Registered User.
Local time
Today, 08:37
Joined
May 10, 2007
Messages
205
When I create an option group it automatically stores selected option values as numbers. Is it possible to store the selected option as text ? For example one option group will allow the user to select one of seven days in the week. Can I store Sunday as Sunday instead of 1 ? How can I do this ?
 
No. What you see is what you get. If you try replacing the assigned values with text, Access will tell you this!
 
Not sure exactly what you are after, but see if this meets your needs.

Code:
Enum DayOfWeek
    dSunday = 1
    dMonday = 2
    dTuesday = 3
    dWednesday = 4
    dThursday = 5
    dFriday = 6
    dSaturday = 7
End Enum

Public Function GetDayOfWeek(eDay as DayOfWeek) as string

Select Case eDay
     Case DayOfWeek.dSunday
          GetDayOfWeek = "Sunday"
     Case DayOfWeek.dMonday
          GetDayOfWeek = "Monday"
....
     Case Else
          GetDayOfWeek = "Not Applicable"
End Select

End Function
 

Users who are viewing this thread

Back
Top Bottom