Option Compare Database Option Explicit ' Simple encryption function Function EncryptPassword(ByVal strPassword As String) As String Dim i As Integer Dim strEncrypted As String Dim intKey As Integer intKey = 5 ' Simple key for shifting characters strEncrypted = "" For i = 1 To Len(strPassword) strEncrypted = strEncrypted & Chr(Asc(Mid(strPassword, i, 1)) + intKey) Next i EncryptPassword = strEncrypted End Function ' Simple decryption function Function DecryptPassword(ByVal strEncrypted As String) As String Dim i As Integer Dim strDecrypted As String Dim intKey As Integer intKey = 5 ' Same key used for encryption strDecrypted = "" For i = 1 To Len(strEncrypted) strDecrypted = strDecrypted & Chr(Asc(Mid(strEncrypted, i, 1)) - intKey) Next i DecryptPassword = strDecrypted End Function