disable shift open key

You need that as an autoexec, have you done that?
A simple function name is not going to work unless you call it from the autoexec?

No, I’ve not done! …. What I have to do as well as add vba module ?

Thanks
 
ok.
I put it in autoexec, it partially works, because in the FE the shift key at startup is disable forever!
No matter if "unlock_shift.txt" is present in C:\ the shifkey is always disabled!
Something to change in the code?
Is there a way to enable shif key again? (Anyway I've made a copy of my db before)

I've also insered the same module in BE file, but in this case the shifkey isn't disabled!
 
another thing: on FE file the shifkey is disabled only when it found the "unlock_shift.txt" on c:\
but if "unlock_shift.txt" is not present the shifkey is locked anyway!

I would like to have a code that lock shif key at startup both for FE and BE, and when "unlock_shift.txt" will be present on c:\ the shif lock is abled.
 
I need to be able to view and access to tables and modules, after users have entered data!

This was in your original post. I'm confused. WHY do you need to view tables (at a definitional level) and modules? Can your users actually diddle with something at either level? If you want to go through the trouble of dealing dynamically with the shift bypass function, then there is something wrong with this process at the operational/security level.

Ideally, you HAVE no modules in the back-end and your users never directly open the back-end in a way to allow them to diddle with tables. If every user has a distinct & separate front-end, then as long as they don't try to overwrite your "master copy" of the FE, they can only harm themselves. Therefore, I am confused as to WHY you asked for that requirement. Can you explain?
 
I’m not saretta000 !

I need only to disable shift key in FE and BE.
And I need a way to enable shiftkey when it is necessary.
Unlock shofkey when “unlock_shift.txt” it is ok for me
 
Run that code that I posted in post #20 and see what you have.
WALK your code with F8 and see what it does, not what you think it does.

Basic debugging 101.
Probably need a password for the BE if you want to stop people going in the BE.
 
  • Like
Reactions: 823
another thing: on FE file the shifkey is disabled only when it found the "unlock_shift.txt" on c:\
but if "unlock_shift.txt" is not present the shifkey is locked anyway!
That is NOT what the code does. :(
If the file is not present then the FE will NEVER be unlocked.
Plus you have to quit the DB and open it AGAIN to see if it has worked.
 
  • Like
Reactions: 823
That is NOT what the code does. :(
If the file is not present then the FE will NEVER be unlocked.
Plus you have to quit the DB and open it AGAIN to see if it has worked.

ahh ok! It do exaclty that you wrote!

Run that code that I posted in post #20 and see what you have.
WALK your code with F8 and see what it does, not what you think it does.

Basic debugging 101.
Probably need a password for the BE if you want to stop people going in the BE.

How can I run that code?
I've copied the code into a vba module, and then? I've created an autoexec but It doesn't find function....



"I would like to have a code that lock shif key at startup both for FE and BE, and when "unlock_shift.txt" will be present on c:\ the shif lock is abled."
It should be possible?
 
You can run that code manually.
You can enable the bypass in the immediate window I suspect.
Just copy the True code and paste in the Immediate window and press Enter. Close the db and open again.
Again walk your code line by line. No better way to see what is actually happening.
 
ahh ok! It do exaclty that you wrote!



How can I run that code?
I've copied the code into a vba module, and then? I've created an autoexec but It doesn't find function....



"I would like to have a code that lock shif key at startup both for FE and BE, and when "unlock_shift.txt" will be present on c:\ the shif lock is abled."
It should be possible?
Well if it doesn't find the function it is NEVER going to run.
Walking your code would prove that. :(
 
I'm sorry I didn't understand, where is "immediate window", and where have I to copy the code?
 
Use Ctrl +G or Alt + F11
See my link for debugging Vba code.
 
I’m not saretta000 !

I need only to disable shift key in FE and BE.
And I need a way to enable shiftkey when it is necessary.
Unlock shofkey when “unlock_shift.txt” it is ok for me
If that's all you need to do, perhaps you can forget about this code and simply use this old utility.
 

Attachments

  • Immagine 2025-02-02 214407.png
    Immagine 2025-02-02 214407.png
    89.4 KB · Views: 23
Well I suspect you will need to change that to whatever that word is in your language? :(
 
Ever heard of Google Translate? :(
What part of property in English do you not know what it means, that you cannot translate into Italian?
 
This is what It appears running code on post #20
I now think that is a reference issue, but I do not know which reference is required. :(
 

Users who are viewing this thread

Back
Top Bottom