Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Translation of Numeric to Cardinal Value

Status
Not open for further replies.
May 7, 1999
130
US
I'd like to create (or use, if once exists) a function that "translates" a numeric value of 1 through, say, 26 to A through Z. I want to use an index (the 1-26) in coding, but have the result become a suffix to a label of a variable. For example if the index value is 6, I'd like to pick off the sixth element of an array, "F." And, of course, if I wanted 1-26 to refer to A,Z,B,Y,C,X, etc. and have the sixth element refer to X, is there a convenient way to do so?

As I was typing this, I realized that I could simply set of a string of AZBYCX and use the "mid" function to get at the data. Why didn't I think of that before? Guess it's the old "when I explain the problem, I see the solution" syndrome. If someone has a better/more elegant way, please let me know.

Thanks, John Harkins
 
John,

Try making a table. Then you can store as much or as little data related to that number as you'd like.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top