pashew
pashew

Reputation: 43

prevent using an Access database on other computers

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

Answers (3)

zoonosis
zoonosis

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.

http://www.mrexcel.com/forum/excel-questions/457262-visual-basic-applications-code-do-check-valid-use-computer.html

Upvotes: 0

user3728595
user3728595

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

VT555
VT555

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.

http://office.microsoft.com/en-001/access-help/encrypt-a-database-by-using-a-database-password-HA010096299.aspx#BM2

Upvotes: 0

Related Questions