Reputation: 43
I have an Access database and I want make it work for one computer only. If someone takes a copy of my database they shouldn't be able to open it on another machine.
I was thinking that the database could check the properties of the computer to see if they match those of the machine on which it should run. If not, the database would show a MsgBox that says "You can't open this database because you copied to other computer please call the programmer."
Upvotes: 1
Views: 1556
Reputation: 799
Been looking for an answer to this myself...and came across this. This link shows a couple of ways that might be a bit more unique. You can check for hard drive serial number or motherboard serial number. Computer name and usernames can be moved to other PCs...it would be a lot harder to move hard drives or motherboards around.
Upvotes: 0
Reputation:
You can use VBA in a start-up routine to check if the following properties match some predetermined values:
VBA.Environ("ComputerName")
VBA.Environ("UserDomain")
VBA.Environ("UserName")
To prevent users bypassing your start-up routine by holding down the Shift key, you can use the following code as a one-off to add a property to the database preventing this (works in Access 2007, not sure about earlier versions):
Dim AllowBypassKey As Property
Set AllowBypassKey = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean, vbFalse)
CurrentDb.Properties.Append AllowBypassKey
Upvotes: 1
Reputation: 91
In access you can encrypt the database with a password. This will only allow the users who have the password to open the database.
Upvotes: 0