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?
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()
Me.DateClosed = ""
Me.EditTime = ""
Me.Closing_Agent = ""
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