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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASC REverse

Status
Not open for further replies.

jester4281

IS-IT--Management
Sep 12, 2002
160
US
How can I convert the results back to the original. I am using the following code I nabbed off on one of the forums, but need to know how to generate the opposite for display purposes. This gives me a string of text, I need to save that in the database, but later I need to display the actual value on a form.


VUsername = ALLTRIM(Thisform.Username_Box.Value)
UsernamecString = Vusername

n = LEN(UsernamecString)
cNewStr = ''
FOR I = 1 TO n
SaveUsername = cNewStr+CHR(ASC(SUBSTR(UsernamecString,i,1))+123)
ENDFOR
Thisform.Save_Username.Value = SaveUsername
 
Assuming you weren't using any ASCII characters above 132, just change the +123 to -123.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top