Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139

    Unanswered: Keyboard vs. click problem

    Hello;

    I have the code listed below in a field (Status). It works fine when the option is selected by the mouse via drop down list, however when the user enters the first letter (C(for Closed/Completed)) from the keyboard, it does not fill in the related fields as desired (i.e code does not function as desired (no errors returned)). Field properties are set to yes on limit to list, and allow auto correct to yes if that makes a difference. Can this be corrected?

    Thanks
    Larry
    __________________________________________________ _________

    Private Sub Status_Change()

    If (Status) = "Closed/Completed" Then
    'Status locked when already set to closed via the Got Focus function/event
    Me.DateClosed = Date
    Me.EditTime = Now()
    Me.Closing_Agent = GetUser()
    Else

    Me.DateClosed = ""
    Me.EditTime = ""
    Me.Closing_Agent = ""
    End If


    End Sub

    _______________________________________________

    Private Sub Status_GotFocus()

    'Lock Status field if closing agent is not user agent.
    'Unlock field if blank, or user agent.

    If IsNull(Me.Closing_Agent) Or Me.Closing_Agent & "" = "" Or Me.Closing_Agent = GetUser() Then
    Me.Status.Locked = False

    Else
    Me.Status.Locked = True
    End If


    End Sub

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    You might want to consider using AfterUpdate instead of Change and the Current event of the form for GotFocus. I think it will work better for you.

  3. #3
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139
    Thanks DC... that seemed to help, but not cure the problem entirely. I'm still testing to see if I can isolate the exact user sequence that causes the problem. If I could only get rid of the users !

    Larry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •