Lynn, thanks for you reply.
the cmdenter button is not on frm updateunitinformation its on the form i
setup to enter the password. i know the me. bit is wrong but i dont know
what to replace me. with?
when i run the code and enter a correct password the password form still
remains on view and i cant get rid of it. when i enter an incorrect password
it works fine.
when i enter a correct password i get an error message that says the object
specified is close...
Try changing your code to this:
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"), ""))
msgbox ("access granted")
docmd.opeformstdocname,,,stlinkcriteria
docmd.maximize
forms!frmupdateunitinformation.allowedits = true
forms!frmupdateunitinformation.allowdeletions = true
forms!frmupdateunitinformation.allow additions = true
me.visible = false
else
forms!frmupdateunitinformation.allowedits = false
forms!frmupdateunitinformation.allowdeletions = false
forms!frmupdateunitinformation.allow additions = false
me.visible = false
end if
end sub

Signature
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
> Lynn, thanks for you reply.
>
[quoted text clipped - 60 lines]
> > >
> > > end sub
paul - 14 Oct 2004 10:09 GMT
lynn thanks again that worked for that form.
however, is it possilbe to chage this part of the code
forms!frmupdateunitinformation. to something that recognises the form that
called the password form.
the reason that i ask is, i have a number of forms that call the security
form, if i use the forms!frmupdateunitinformation the secuirty form will only
set the read,write value of forms!frmupdateunitinformation.
if it is possilbe i would like to amend:
forms!frmupdateunitinformation.allowedits = true to
form!(the form that called the security form).allowedits = true ect...
hope this makes sense, thanks for your past assistance if you are unable to
help this time
paul
> Try changing your code to this:
>
[quoted text clipped - 103 lines]
> > > >
> > > > end sub
az - 04 Apr 2007 10:46 GMT
> Try changing your code to this:
>
[quoted text clipped - 105 lines]
>
> please help me my access cant open at all it ask me administrator pasword