Thak you again for your help and support !
1- You are right my mother tong is no English but I use English
Windows 2000 and English Access 2003 !
2-Your suggested link does not appear to work to day
http://library.thinkquest.org/27158/concept.html
3-When the Encryp function founds an accented word (in Spanish
language we have a lot of them)like for example: autobús
The query returns an #Error and stops showing this message:
Error in Run-time Error: "5"
Invalid procedure call or argument !
When next accented word is found in the Query (using the encryption
function)
Again the Query stops and so on........
My query is as follows:
Field (1): SPANISH
Table : tblDicctionary
Field (2): SPANISH ENCRYPTED:encryptPW([SPANISH])
Table: --No table----
4-I think the problem now is in the encryption function it selft, is
not considering accetuates words as good ones.
If you any other rutine or idea how to resolve the problem I will
apreciate it.
Regards
Javier Gomez
"DFS" <nospam@DFS.com> wrote in message news:<88xYd.18031$733.9942@fe07.lga>...[color=blue]
> Bri wrote:[color=green]
> > Javier,
> >
> > This wasn't my function, I was just pointing out how to use the advice
> > you were given in the other message.
> >
> > As to your new problem, you will get more help if you tell us what
> > error number/message you are getting, what line it is happening on
> > and what the input is that you are trying to send to the function.
> >
> > If I had to guess, I would say that you are sending a character that
> > is in the ASC value of 206 or more (because then adding 50 creates a
> > new character that is not a valid character since the max value is
> > 255). Since it seems that your native language is not english, it
> > could be one of the special accented letters.[/color]
>
> Yes.
>
>[color=green]
> > The way around this
> > would be to test if the ASC value +50 is greater than 206 and then
> > subtract 206 from it before you create the new character. You will
> > need to do the reverse test (ie check for value <50 and then add 206)
> > on the decrypt function.[/color]
>
>
> And Javier, you should recognize I chose 50 arbitrarily. Any ASCII shift,
> plus or minus, will [weakly] disguise your data. Remember, it can easily be
> decrypted by any curious user who can find an ASCII table on the Web.
>
> If you want to make your data really hard to read or decipher outside your
> app, there are lots of tricks you can play with classic forms of encryption,
> including letter substitution and transposition, and using a keyword and
> routines hard-coded inside an .mde. These types of encryption generally
> require very experienced cryptanalysts or computer analysis to decipher.
>
> This webpage will give you a brief introduction to classic cryptography
>
http://library.thinkquest.org/27158/concept.html
>
> There's a really interesting encryption method invented by the Germans in
> World War 1. It's called ADFGVX, which are the only six letters used in the
> ciphertext (the encrypted data). I wrote a VB program [for myself] that
> used ADFGVX to encrypt/decrypt short paragraphs, and it ran quickly, but I
> can't vouch for the speed if you tried to use it in an Access/VBA system.
>
>
>
>[color=green]
> > Javier Gomez wrote:[color=darkred]
> >> Thank you !
> >> This problem is now arranged, but when I try to use this function in
> >> a
> >> Query for Example 8.000 records the function starts making some
> >> debugs problems I need to Cancel function sereval times until Access
> >> let me
> >> quit from the Query.
> >> What can I do ?
> >>
> >> Regards
> >> Javier Gomez
> >>
> >>
> >> Bri <not@here.com> wrote in message
> >> news:<62%Xd.633803$6l.613535@pd7tw2no>...
> >>
> >>> As advised, get rid of the UCase in the Encrypt function.
> >>>
> >>> Line:
> >>> encryptPW = encryptPW & Chr(Asc(MID(UCase(pWord), I, 1)) + 50)
> >>>
> >>> Becomes:
> >>> encryptPW = encryptPW & Chr(Asc(MID(pWord, I, 1)) + 50)
> >>>
> >>> --
> >>> Bri
> >>>
> >>> Javier Gomez wrote:
> >>>
> >>>> Sorry but not understand !
> >>>>
> >>>>
> >>>> Example:
> >>>> (before encrypt)= Trevor Best
> >>>> (Encryp)=xxxx
> >>>> (after encryp)= TREVOR BEST
> >>>> And I need after encrypt to get Trevor Best !
> >>>>
> >>>> Can you please write the full code (considering uppercase words)?
> >>>>
> >>>> Javier
> >>>>
> >>>
> >>> Original Function:
> >>> Public Function encryptPW(pWord As String) As String
> >>> encryptPW = ""
> >>> For I = 1 To Len(pWord)
> >>> encryptPW = encryptPW & Chr(Asc(MID(UCase(pWord), I, 1)) + 50)
> >>> Next I
> >>> End Function[/color][/color][/color]