password for each employee

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an employee clock-in program. I have hundreds of employees and
hundreds of password fields tied to each employee. I want the form view for
each record to only update and save if the field for password is filled out
correctly. If not, I want an error message and a cancel procedure to take
place. Can this be done?
 
Hi,

in the event of a button try this

if isnull(me.txtPassword.value) then
msgbox "Please enter a password"
me.txtPassword.setfocus
exit sub
end if

if len(trim(me.txtPassword.value))<5 then
msgbox "You need to enter a password with a least 5 characters"
me.txtPassword.setfocus
end if

either

docmd.runcmd accmdsaverecord

or

docmd.close acform, me.name, acsaveyes

(check the syntax of the about as I might have spelt some of it wrong)

Hope that answers your question.
 
Back
Top