G
Guest
I have a drop down (lookup field) and when the user selects a record that is
currently locked, on the Before Update property I am displaying an error
message and then I set cancel = false and exit sub. How do I set the drop
down field to empty again? When the user tries to go to another drop down
(lookup field) they get the same error message - can't get out of the drop
down.
Here is my code:
Private Sub cboFileNumberLookup_BeforeUpdate(Cancel As Integer)
sLookupType = "File"
CheckIfLocked
If bLockedRecord = True Then 'Record is locked, get out and reset field to
empty
Cancel = True
'Set the drop down field to "" or Null
'cboFileNumberLookup = "" ' Access doesn't allow this statement
Exit Sub
End If
currently locked, on the Before Update property I am displaying an error
message and then I set cancel = false and exit sub. How do I set the drop
down field to empty again? When the user tries to go to another drop down
(lookup field) they get the same error message - can't get out of the drop
down.
Here is my code:
Private Sub cboFileNumberLookup_BeforeUpdate(Cancel As Integer)
sLookupType = "File"
CheckIfLocked
If bLockedRecord = True Then 'Record is locked, get out and reset field to
empty
Cancel = True
'Set the drop down field to "" or Null
'cboFileNumberLookup = "" ' Access doesn't allow this statement
Exit Sub
End If