Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1453
  • Last Modified:

dynamic enum or auto list reords

hi,
I have a table with only 15 to 20 records and can go up to 50 records.
the flds are
Id , value

records
eg., 1 Techlog
       2 Stationlog
 etc.
Is there any method where in i can use the records as enums, so that it would be coming in vb autolist so tht if i refer tht variable it would be easy to refer and code
like dynamically create enum like thing
public enum module
     iTechLog = 1
     iStationLog = 2
end enum



Regards,
M.Naveen Swamy
0
Naveen Swamy
Asked:
Naveen Swamy
1 Solution
 
Anthony PerkinsCommented:
No.  Enums cannot be defined dynamically.
0
 
XavCheeseCommented:
One approach you might try (if you haven't already) is to load those values into a combo dropdown list, and use the ID value as the ItemData.  That way when an item is selected, you can get the corresponding ItemData that you know is the database key.

If what you want is internal (ie not for the user), then just dynamically loading up an array with the values should get you similar results as the enum.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now