I don't remember exactly what I did and I changed the code to just send the password after that. Besides, we all know how easy it is to defeat an access password anyway, so encrypting the password within the exe is a lame security attempt at best.

Anway, I think I sent the password through this and used the result as the string in the exe. Then I passed it through the decrypt version before putting it in the connection string. This algorithm doesn't use a key and I know it's not very secure. I just didn't want the password in plain sight within the exe.

VB Code:
  1. Public Function EncryptText(sString As String) As String
  2. Dim i As Long
  3. Dim iLen As Long
  4. Dim sDest As String
  5.  
  6. On Error GoTo errHandler
  7.  
  8. sDest = sString
  9. iLen = Len(sDest) + 1
  10.  
  11. For i = 1 To Len(sDest)
  12.   Mid$(sDest, i, 1) = Chr$((270 + i - Asc(Mid$(sString, iLen - i, 1))) And 255)
  13. Next i
  14.  
  15. EncryptText = sDest
  16.  
  17. Exit Function
  18.  
  19. errHandler:
  20. LogError Error, Err, vbNullString, "bFunctions.EncryptText"
  21. EncryptText = vbNullString
  22.  
  23. End Function