How do I PassWord protect a form or command button?

J

Just me

I made a form to use as a switch board with just command buttons to print
repots and to open other forms. I want to place a cammand button on the main
form to open another one but need to password protect it. By knowledge of VB
is very limited to just wat I ave read. ( I will be starting a class in it
tis fall) I ave tried
Set db = CurrentDb()
db.NewPassword "", "open"
I tried tis on te button wit MS code builder for on click I also tried it on
te form itself in On Open
But cant get it to work. I did get one error wit te button tat said "you
can't cange the password in an open unsecure database"
I appreciate any and all suggestions
Tanks in advance for your time and help
 
Top