Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Security / April 2007

Tip: Looking for answers? Try searching our database.

help with passwords

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paul - 13 Oct 2004 11:09 GMT
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
Lynn Trapp - 13 Oct 2004 13:05 GMT
You say it's not working but you don't tell us what it IS doing? Do you get
an error message? Does the form open without the AllowEdits (etc.) property
being set to true? Is the "cmdenter" button on the form
"frmupdateunitinformation"? I suspect it isn't and, therefore, a statement
like "me.allowedits" will have no effect on that form. "Me" is a shortcut
for identifying the currently active form, which is, in this case the form
that the command button is on.

Signature

Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm

> 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
[quoted text clipped - 34 lines]
>
> end sub
paul - 13 Oct 2004 13:27 GMT
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...

> You say it's not working but you don't tell us what it IS doing? Do you get
> an error message? Does the form open without the AllowEdits (etc.) property
[quoted text clipped - 47 lines]
> >
> > end sub
Lynn Trapp - 13 Oct 2004 16:30 GMT
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
Cheah Chin Thai - 14 Oct 2004 02:59 GMT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.