Solved Restrict copying text box data in access vba (1 Viewer)

Ashfaque

Student
Local time
Today, 23:38
Joined
Sep 6, 2004
Messages
894
Yet, you could not be bothered to check for yourself? :unsure:
Yes I re-installed Access and tried after full compilation and it worked. I tried copy to ****** and paste in word doc as test but could not. It means it is restricting.

Thanks all of you gentlemen.

Regards.....
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:08
Joined
May 7, 2009
Messages
19,242
encrypting and salting the password entered rather than obfuscating it using 'key remapping'
what i did is a "simple" remapping. it's up to the OP if he will employ much stronger algorithm.
rc4 perhaps?
 

isladogs

MVP / VIP
Local time
Today, 19:08
Joined
Jan 14, 2017
Messages
18,219
what i did is a "simple" remapping. it's up to the OP if he will employ much stronger algorithm.
rc4 perhaps?
I agree.
As Minty stated earlier, in this case I don't think the OP needs to do either encoding or encryption

Yes - I use RC4 for encryption together with salting to ensure the output of an identical text string is different each time.

For example, using RC4 to encrypt isladogs using the simple cipher AWF will ALWAYS give as output
Code:
?RC4("isladogs","AWF")
Y2ëÝñq(

If that is wrapped in a further function (in this case EcK) the output will be completely different each time:
The example below shows 6 successive outputs for the same salted, encrypted string:
Code:
?ECk(RC4("isladogs","AWF"))
=dJx¿/»PŽS¦W&WfN
)paS¤4Æ-ý À1L=Ld
<e@rÿoŽe³n\*[pX
x!Kyätß4¡|Ð!&WOg
y ZhÑA¶]ŽS”eQ kC
ysAÝM¥N«vÅ4X)Bj
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:08
Joined
May 7, 2009
Messages
19,242
As Minty stated earlier, in this case I don't think the OP needs to do either encoding or encryption
as ive said, use immediate window and it will show what you typed on the "password-masked" textbox.

?Forms!yourForm!yourTextbox

i don't think you immediately encrypt each character as you type?
that would make your "text" longer than what you typed?

i submitted on sample db forum, totally replacing the character you typed with "*"
therefore, if you inspect it in immediate window you get "***", not the real text.
so reversal is totally not possible.
 

isladogs

MVP / VIP
Local time
Today, 19:08
Joined
Jan 14, 2017
Messages
18,219
I've just looked at your sample database and agree that the entered text is now masked in the immediate window as well.
That's good! If doing that is sufficient for the OP, that's fine.

However, my original point applies - encoding is usually fairly simple to decode
If its worth trying to prevent unauthorised copying of text such as entered passwords by encoding the text then it would be far better to encrypt it as well.
 

Users who are viewing this thread

Top Bottom