hmm help with passwords on forms

P

paul

hi ive created a form which opens up with all fields locked. that form has
an unlock button which unlocks all of the fields if the user enters the
correct password. orignally, i had the user entering a password in an
inputbox but realised that this display the password in clear text and not as
*********.

to get round this i was advised to create a form that opens when the unlock
button is pressed (which i did ) then i tried to adapt the code but cant get
it to work, i think it has something to do with the me. statements and a few
others this is the code:

private sub cmdenter_click()

dim stdocname as string
dim stlinkcriteria as string
dim txtseccheck as textbox
dim loki as string

stdocname = "frmupdateunitinformation"

if me.txtseccheck = ucase(NZ(Dlookup("password", "tblpassword ",
"passwordid=1"), ""))
docmd.close
msgbox ("access granted")
docmd.opeformstdocname,,,stlinkcriteria
docmd.maximize
me.allowedits = true
me.allowdeletions = true
me.allow additions = true
else
me.allowedits = false
me.allowdeletions = false
me.allow additions = false
docmd.close

end if

end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

help with passwords 6
need help with password from guru 0
form and passwords 1
Use of Passwords 3
Need help with Dlookup function for use to secure forms 1
asswords 1
User power 1
User power 0

Top