Enable/Disable shift key

ColinEssex

Old registered user
Local time
Today, 20:43
Joined
Feb 22, 2002
Messages
9,451
Hi All

This is more of an idle question rather than a problem, its me being lazy I suppose:rolleyes:

I use the code in my databases that enables/disables the shift key shortcut - all works fine - no probs. You do however (or I do) have to log in to the Db, switch the shift key on, log out and log in again using the shift key shortcut.

Is there anyway to have a seperate Db that can "log into" another Db remotely and switch the shift key so you don't have to log in and out and in again?

or am I doing it wrong anyway.

Yes I know I'm lazy!!!

Col
 
If you had a table that simply stored one record in one field that could be switched between disable/enable in your remote database, and you amended your code to check for the value of this when opening the database then you could use DAO or ADO from your database to set that.
 
Just a thought, but couldn’t you create a module that would enable the shift key and then trigger it after entering the DB? OR - How about have the DB look to see who is logged in at startup, and if it’s you (or whoever requires the shift key) it would enable the key / not disable it.
 
Mile-O, Thanks for the reply. I know what you are getting at but I can't seem to get my head round it.

DB A : is the one the users use with the disable/enable code in it.

Db B : is the remote one on my PC

You're saying have a one line table in Db B. Then on startup (autoExec?) in Db A it checks the value in Db B.

The puzzler for me is that when you open Db A (with the shift key/Enter) won't that be too late? It'll be into its startup by the time it checks Db B.

Sorry to be thick
I appreciate your help

Col
 
Hey Colin,

Try this one out:

Note* I am not the original author of this db.... Just one I picked up along my travels...:D

HTH, (Its in A2K)

Kevin
 

Attachments

Aha!!! I think thats it Kev.... thanks a bunch

I'll have a bash at modifying it to A97 and check it out. Although I'm not too sure what to do to modify it!!

Thanks for all your help chaps

Col
:cool:
 
Cheers Kev

Thats just what I needed

Thanks also to Mile-O and Jeremie

Col
 
Hi Chaps,

Just as an append to this thread, I downloaded Kev's Db and it works fine for databases that are on my PC C drive.

It won't work however for the databases that are on a server where I have a mapped drive to the database.

I'm afraid the Vb code is beyond me for this one..... does anybody have any clues as to why it won't work on mapped Db's that are on a server?

Thanks for any help

Col

:(
 
Col,

I think this maybe a slightly updated version of the same db. Maybe this one will work over a network.

IMO
 

Attachments

Thanks for the help IMO, I appreciate your time

It works fine for

C:\$table\orders.mdb (and any other on my C: drive)

but not for

W:\Stort\Physio\Physio Leave97.mdb (or any other Db on a mapped drive)

perhaps its not meant to be used over a network connection. :confused:


Col
 
Col,

I just tried the 2000 version over the network here and had no problems. Maybe it's a 97/2000 thing??? Sorry.

IMO

PS. Just a thought, have you tried putting the db on the Server and opening it on your pc from there?
 
Last edited:
IMO said:
Col,


PS. Just a thought, have you tried putting the db on the Server and opening it on your pc from there?


I hadn't thought of that IMO, I'll give it a bash later.

Failing that, I think you may be right about the 2000/97 thing.

I appreciate your input though - thanks

Col
 
The examples posted was originally authored by me although all have been altered for some reason or other.

If you open each of the examples and click on File/Database Properties .... it will show "me" as the Author .. except for the "Bypass Commander" thing that is an obvious copy of my original app.

If you want the unaltered versions from me .. go to the links below.

For Access 97:
ByPass Shift Key Utility For Access 97

For Access 200/2002:
ByPass Shift Key Utility For 2000/2002

Hope these original unaltered versions help everyone.

RDH
 
Last edited:
Thanks Rick for posting the originals for the db - I don't remember who i got a copy of it from (it was either from this forum or the Utter Access forum) but I would rather have original, unaltered versions then one that was changed by someone who was not the author... and changed for some unknow reason.

Thanks again~
Kevin
 
LOL ... I agree.

You never know why someone alters these types of things ... sometime alterations improve an app and sometime they just create problems. But that "Blue" form really looks terrible ... LOL
I haven't looked to see if any code had been altered or added and don't intend to ... I just thought I'd post the facts on the subject.

I hope it help everyone .....

RDH
 
Sorry to raise this thread again.

The unaltered 97 version that Rick posted works with no probs for databases on a server IF the database has NOT got an Access password set. If it has a password (not workgroups) it fails.

Is there any clever person out there who can amend the code so it can take a password into consideration? I've really tried but failed miserably:rolleyes: I was thinking along the lines of having a textbox to enter the password on the form and then to refer to the textbox from the code. I just can't fathom out where in the code to put it.

Thanks all - I'm nearly there - just one last shove needed;)

Col
 
Sorted this problem like this (just to finish this thread)

Add a textbox to the form, set InputMask to password.

Then add this line of code to compensate for their being a password or not.

Code:
srtPassword = Me.PWord

If strPassword = Null Then
Set db = ws.OpenDatabase(strDBName)
Else
Set db = ws.OpenDatabase(strDBName, False, False, "MS Access;PWD=" & strPassword)
End If

It works a treat. Now you can set the shift enable/disable from your own PC ....lovely jubbly:D

Col
 
This time next year...........

you know it makes sense..........


Mange tous.......


Bonjour
 

Users who are viewing this thread

Back
Top Bottom