I am getting an error because the focus is set to txtExceptionName. This is an id key that is auto generated for a new recored, but I need to lock this field out so no one can change the id once it has been created. but I need a new ID created only if there is a new record being created. Any ideas?
I am getting the following error:
Run-time Error '2169':
You can't disable a control while it has the focus.
Code:
Private Sub Form_Load()
If Application.IsCompiled = True Then
Me!txtPostDate.Enabled = False
Me!btnPostDate.Enabled = False
Me!txtExceptionName.Enabled = False 'Error happens here
End If
End Sub
Thanks,
Darkhat01
I am getting the following error:
Run-time Error '2169':
You can't disable a control while it has the focus.
Code:
Private Sub Form_Load()
If Application.IsCompiled = True Then
Me!txtPostDate.Enabled = False
Me!btnPostDate.Enabled = False
Me!txtExceptionName.Enabled = False 'Error happens here
End If
End Sub
Thanks,
Darkhat01