Locking PC for use while DB is running?

rede96

Registered User.
Local time
Today, 23:17
Joined
Apr 2, 2004
Messages
134
I have a database on a stand alone PC that is used solely for capturing bar code reads from a scanner. In order for the result of the scan to be captured and stored in the database, the focus needs to remain on the open form.

So I am looking for any tips or tricks that would stop some curious sole from using the mouse to navigate away from the form or to other PC applications.

Ideally I'd like to lock everything up except for a button on the form which is password protected, which will lock / unlock everything.

Anyone got a any ideas please?
 
Have never done this myself but I think the approach I would use is a modal form without any closing controls like "control box" "Close button" you can set this up in the forms property sheet. Don't do this to your existing database, you might knock yourself out. In other words do it in a test database, make a copy of your master database get it working in that. And keep plenty of backups. You will need some form of access to the program, you could possibly use a key combination, or have an invisible command button on the form, a little tiny one somewhere where no one can find it, for closing the form.
 
Have never done this myself but I think the approach I would use is a modal form without any closing controls like "control box" "Close button" you can set this up in the forms property sheet. Don't do this to your existing database, you might knock yourself out. In other words do it in a test database, make a copy of your master database get it working in that. And keep plenty of backups. You will need some form of access to the program, you could possibly use a key combination, or have an invisible command button on the form, a little tiny one somewhere where no one can find it, for closing the form.

Thanks for the reply. I can use model and set the form with a button the closes the form but is password protected. But it doesn't stop someone from navigating outside the database to other PC apps. Model would work great if I knew a way of making the database the only application that can be accessed. But not sure how to do that?
 
I'm confused by one thing. I know of nothing that depends on focus being present unless you are actually inputting data using the keyboard to a control that is in focus. Is this what you meant?

If not, then it should be possible to LOCK the terminal. As long as you don't actually have to interact with the form controls via mouse & keys, Access should still run.

Are you sure about the "remain in focus" requirement?
 
Depending on the OS, you should also be able to run the system in KIOSK mode.
 
Rede96,

I'd like to hear more about the environment including the sensitivity of the data involved, the people who might access the executing program/application, and the location of the PC.

Worst case scenario could be a locked room with extremely limited access.
 
Rede96,

I'd like to hear more about the environment including the sensitivity of the data involved, the people who might access the executing program/application, and the location of the PC.

Worst case scenario could be a locked room with extremely limited access.

There is no sensitive data, I just need the form to remain open and the control on the form always in focus. It's actually a really simple form with just one control that accepts the data from the scanner.

The problem when an operator scans a bar code, the data is sent to the PC as if someone just typed it in. But if the focus moves away from the control, say to a windows menu outside of the database, there is no way I know of for windows to automatically return focus to the database. I can do that within access no problem. But there is nothing to stop someone opening up a word document or clicking on the windows start button for example.

The database is split so the data goes to tables on a server so I access the data from other front ends on other PC's
 
I'm confused by one thing. I know of nothing that depends on focus being present unless you are actually inputting data using the keyboard to a control that is in focus. Is this what you meant?

Yes, that's basically how the bar code scanner works. Each time a scan is made is acts as if someone has just typed the data in. But the scanners are wireless and remote from the terminal. So I can't just ask the op to navigate to the form each time they make a scan. Also there are mutiple scanners.

Everything works great as long as the focus remains on the control in the form. I could just lock the PC up in a box, which would be the simplest solution. But would prefer to do it programmatically if I can.
 
How about using a Timer event to check the focus?
 
Although the OP should have mentioned the cross-posting (see the link in post #8), the question intrigued me enough to have a go at doing this myself.

For this, I used some of the code I posted in the repository recently:
https://www.access-programmers.co.uk...d.php?t=293584

Attached is an example intended to show how a database can be 'locked'.
The purpose is to maintain focus on this form by preventing users moving outside the database 'window'.

AFAIK this is what Rural Guy called Kiosk mode

The database has 1 form which runs full screen with the following items all removed / hidden
- Access database window / title and menu bars / command buttons
- Navigation pane / ribbon
- Windows taskbar

For the purposes of this demo ONLY:
1. To display the taskbar, press Ctrl+Shift+T
2. To close the database, press Ctrl+Q
3. To re- enable the shift bypass key next time this is opened, press Ctrl+Shift+K, then enter the password: MendipDataSystems

All of these shortcuts are included in the Autokeys macro
Normally, these would be modified or removed in the final production version

NOTE: This is version 1.1 & still has known limitations/issues:
1. Users can still use Alt+Tab and the Windows key.
2. A hidden copy of Access may remain running after quitting this database. Close using the Task Manager
These issues will hopefully be fixed in a later version

UPDATED 09/06/2017 22.30 GMT
3. When you first open this after downloading, active content will be disabled and you will be able to see nav pane, title bar etc.
After you enable content it SHOULD work as intended.
I will also sort this out in a later version
4. Minor update to v1.1. It will now also compile & run on 64-bit Access

Please reply to this thread if you have any comments or discover other issues so these can also be fixed

===================================
For info, I'm going to cross post a link to this in the identical thread on Utter Access
 

Attachments

Last edited:
Thank you to everyone for the help and suggestions. I think I have a good solution I'm going to try based on ridders code (Thank you Colin) and potentially kiosk mode once I've investigated this a little more.

Cheers to all :)
 
You're welcome.
Could you post your version when its done
 
Minor update to the example database I posted in #14

Fixed issue where Access wasn't closing correctly leaving a 'hidden' copy to be removed using the Task Manager. This was a simple code error on my part

Disabling key press events like Alt+Tab & use of the Windows key is going to be more tricky.
Looks like it will need use of Windows API calls and/or registry changes to achieve

Version 1.2. attached
On downloading, you will of course need to click the Enable Content button before this will work correctly
 

Attachments

Last edited:
Disabling key press events like Alt+Tab & use of the Windows key is going to be more tricky.

Thanks for the update. I thought I might be able to use the excel application.onkey method to catch alt, tab, ctrl and windows key but can't seem to get it to work in access.
 
See my comment in your new thread..
I've also sent you a private message about this item
 

Users who are viewing this thread

Back
Top Bottom