aqif
Registered User.
- Local time
- Today, 06:10
- Joined
- Jul 9, 2001
- Messages
- 158
Hi All
I want to create a function that will lookup the numerical value for thier text value like
Val Desc
--- ----
1 Country 1
2 Country 2
3 Country 3
Note: I can only have a possible of 40 Countries. Rite now I am creating a countries table and then matching the values through lookup function like:
DLookup("[TblCountries]![Desc]", "TblCountries", "[TblCountries]![Val]=" & TxtCountry_Num)
If i'll send this function to someone else in my department for thier database, they will have to create table of Countries again and have to insert the values inorder for this function to work. I want that some array or maybe 40 variables holding names of the countries could be created in the function itself and use lookup or some other function to match the values.
One alternative is to create the table at runtime and insert the values but t slows down the process n approach looks odd. is there any way to achieve what I m trying to do?
Cheers!
Aqif

I want to create a function that will lookup the numerical value for thier text value like
Val Desc
--- ----
1 Country 1
2 Country 2
3 Country 3
Note: I can only have a possible of 40 Countries. Rite now I am creating a countries table and then matching the values through lookup function like:
DLookup("[TblCountries]![Desc]", "TblCountries", "[TblCountries]![Val]=" & TxtCountry_Num)
If i'll send this function to someone else in my department for thier database, they will have to create table of Countries again and have to insert the values inorder for this function to work. I want that some array or maybe 40 variables holding names of the countries could be created in the function itself and use lookup or some other function to match the values.
One alternative is to create the table at runtime and insert the values but t slows down the process n approach looks odd. is there any way to achieve what I m trying to do?
Cheers!
Aqif