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 / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Password Protecting Fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bokims - 10 Jan 2008 17:00 GMT
I want signature blocks on my form only accessible to the person who signed
in.  I have user level security so the person must sign in to have access to
the form but beyond that I only want that person to be able to fill his/her
name in, in their spot only to show agreement - electronic signature.  I have
this on one form but cant duplicate it on the second.  This is what was used
on the first - as best I can tell.

Private Sub Signature_BeforeUpdate(Cancel As Integer)
Dim Response As String
   Response = InputBox("Enter Password", "Password Required")
       If Response <> DLookup("[Password]", "tblSignaturePasswords",
"UserName=Forms!EHSRNew!Cuser") Then
       Beep
       MsgBox "Incorrect Password.", vbOKOnly, "Entry Denied"
       Cancel = True
       Signature.Undo
       End If
End Sub

and

Private Sub Form_Current()
If CUser = "Drowe" Then
   Signature.Visible = False
   Signature_2_.Visible = False
   Signature_3_.Visible = False
   Signature_5_.Visible = True
   Signature_6_.Visible = False
ElseIf CUser = "John Cefola" Then
   Signature.Visible = True
   Signature_2_.Visible = False
   Signature_3_.Visible = False
   Signature_5_.Visible = False
   Signature_6_.Visible = False
ElseIf CUser = "Jarod Craig" Then
   Signature.Visible = False
   Signature_2_.Visible = False
   Signature_3_.Visible = True
   Signature_5_.Visible = False
   Signature_6_.Visible = False
EndIf
EndSub
Ricoy-Chicago - 10 Jan 2008 17:33 GMT
Is this form used in a network? if it is, then use the username as the
control, then set your restrictions in the Open-Event of the form, I have
done that because I have 10 users and each user has different restrictions on
the form.

> I want signature blocks on my form only accessible to the person who
> signed
[quoted text clipped - 43 lines]
> EndIf
> EndSub
Ricoy-Chicago - 10 Jan 2008 17:37 GMT
> I want signature blocks on my form only accessible to the person who
> signed
[quoted text clipped - 43 lines]
> EndIf
> EndSub
Douglas J. Steele - 10 Jan 2008 17:40 GMT
I may have mislead you. It's not necessary to put the reference to the field outside of quotes like I said it was.

Now, you appear to have posted the exact same code twice. You need to determine what's different from the new code versus the old code.

If you need more help, as I said before, simply saying that it "does not work" doesn't give me anything to go on. What does "does not work" mean? Are you getting an error message? If so, what's the error? If you're not getting an error message, what does happen, and what should happen?

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

 I want signature blocks on my form only accessible to the person who signed
 in.  I have user level security so the person must sign in to have access to
 the form but beyond that I only want that person to be able to fill his/her
 name in, in their spot only to show agreement - electronic signature.  I have
 this on one form but cant duplicate it on the second.  This is what was used
 on the first - as best I can tell.

 Private Sub Signature_BeforeUpdate(Cancel As Integer)
 Dim Response As String
     Response = InputBox("Enter Password", "Password Required")
         If Response <> DLookup("[Password]", "tblSignaturePasswords",
 "UserName=Forms!EHSRNew!Cuser") Then
         Beep
         MsgBox "Incorrect Password.", vbOKOnly, "Entry Denied"
         Cancel = True
         Signature.Undo
         End If
 End Sub

 and

 Private Sub Form_Current()
 If CUser = "Drowe" Then
     Signature.Visible = False
     Signature_2_.Visible = False
     Signature_3_.Visible = False
     Signature_5_.Visible = True
     Signature_6_.Visible = False
 ElseIf CUser = "John Cefola" Then
     Signature.Visible = True
     Signature_2_.Visible = False
     Signature_3_.Visible = False
     Signature_5_.Visible = False
     Signature_6_.Visible = False
 ElseIf CUser = "Jarod Craig" Then
     Signature.Visible = False
     Signature_2_.Visible = False
     Signature_3_.Visible = True
     Signature_5_.Visible = False
     Signature_6_.Visible = False
 EndIf
 EndSub
 
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



©2009 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.