Results 1 to 4 of 4
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Code Error on Form To Disable Shift Key

    I am trying to implement code to disable the shift key. I have a Password Form that if password is correct opens another form named frmSetCloseState and it is here that you can enable or disable the shift key. When this form is opened it asks if you want to enable the shift key, if so the forms command button is visible and enabled, else it is not and the form closes.
    Here is my code error: Pic Attached
    Attached Thumbnails Attached Thumbnails CodeError.jpg  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Did you build the SetProperties custom function in a public (general) module?

    Review http://www.databasedev.co.uk/disable_shift_bypass.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Got it working. TOO Good in fact. Cant Disable the stupid thing now!

    Wow, fixed that. Now, what am I doing wrong with this code? I am trying to limit the number of attempts a user can have before closing.

    If IsNull(Forms!frmPassword!Text0.Value) Then
    MsgBox "You cannot enter a blank Password. Try again."
    Me!Text0.SetFocus

    End If

    If Me.Text0.Value & "'" <> Me.Text0.Value Then 'No More Than 3 Attempts Allowed
    ' Me.Text0.Value = Me.Text0.Value + 1
    If Me.Text0.Value > 3 Then
    MsgBox "You may not make more than three Password entry attempts.", vbCritical + vbOKOnly, "Oops!"
    DoCmd.Quit
    End If
    MsgBox "The Password for " & Me.Text0.Value & " is incorrect." & vbCrLf & _
    "Please enter your correct Password or contact your Application " & _
    "Administrator.", vbOKOnly, "Password for " & Me.Text0.Value & " Incorrect"
    Exit Sub
    Else
    If (Forms!frmPassword!Text0 = "*************") Then

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmSetCloseState"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    DoCmd.Close acForm, Me.Name
    End If
    End If
    Last edited by burrina; 12-24-2012 at 03:54 PM. Reason: Fixed That.

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Solved this with some code adjustments. Thanks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-02-2012, 10:27 AM
  2. Replies: 10
    Last Post: 04-25-2012, 12:12 AM
  3. Vba Code delete&shift up cells- Access 2007
    By Luca87itc in forum Programming
    Replies: 2
    Last Post: 02-08-2012, 02:36 AM
  4. Replies: 0
    Last Post: 11-22-2011, 09:10 PM
  5. disable debug error
    By alex_raju in forum Access
    Replies: 1
    Last Post: 08-13-2011, 12:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums