There are many options for this... so you can be creative.
First off... you probably know this, but you are breaking the one of the rules of the first normal form of relational database... you are storing multiple values in a single field of a record. If you wernen't doing that this would simply be a matter of a sql query.
Anyway - here are a few ideas,
You could have a function to which you pass each interest id, and which returns the string associated with it:
function getInterest(byval interestId)
Select Case clng(interestId)
Case 1
getInterest = "sport"
Case 2
getInterest = "music"
Case 3
getInterest = "programming"
Case 4
getInterest = "drinking"
end select
end function
Alternatively, you could create an array that holds all the values for each id:
arrInterests = split("sport:music:programming:drinking", ":")
and then access them in a similar method:
function getInterest(byval interestId)
getInterest = arrInterests(clng(interestId))
end function
These are just a few ideas...
You could use a dictionary object as well, or make an clsInterests class to provide the services... etc.
Woody Z
http://www.learntoprogramnow.com