need help with password from guru

P

paul

hi,

ive created a form that opens up with all of the fields locked because some
people are only allowed to view data and not edit ect. i have then created
an unlock button (cmd button) which opens a form. This form is reponsible
for validating a password and if the password is valid unlocking the orginal
from to allow read write access, the code worked when i was using a msgbox
but since i have created the form it doesnt work. i think i has something to
do with the me. part of it but am not sure.. code reads:

dim stdocname as string
dim stlinkcriteria as string
dim txtseccheck as txtbox
dim loki as string

stdocname = "frmupdateunitinformation"

if me.txtseccheck = ucase(NZ(Dlookup("password", "tblpassword","passwordid
=1), ""
docmd close
msgbox ("Access Granted")
docmd.opeform stodcname,,, stlinkcriteria
docmd.maximize
me.allowedits = true
me.allowdeletions = true
me.allowadditions = true
else
me.allowedits = false
me.allowdeletions = false
me.allowadditions = false
msgbox ("access denied")
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


Top