Question Convert a string into a unique numeric value

access_newbie

New member
Local time
Today, 12:39
Joined
Nov 3, 2008
Messages
3
I have a table with a field called 'Error_Messages' which has very long string values (sometimes greater than 255 characters). I need to use this field to do a join with another table. Rather than using this field (with long string values), I was thinking of converting it into a unique numeric value. Below are some sample examples of the values in the 'Error_Messages' field:

abc
acb
bac

I need to allocate each of the above error message with a unique value. The logic i was thinking is ascii value of a and multiply it with its position within the string and so on so that value of abc does not equal value of acb abd so on.

Can someone advise where (I guess in VB) and how do i write the code for it?

Thanks.
 
Erm, why not just introduce a new column with property 'autonumber'?
 

Users who are viewing this thread

Back
Top Bottom