Hi,
I have the following code in a BeforeUpdate event of a field:-
cmd_PONumberSearch_Click 'activates requery from button
With Me.txt_PONumber
.SelStart = 0
.SelLength = Len(Me.txt_PONumber.Text)
End With
Cancel = True
This is used for continuous searches in a subform and sets focus back on the text field to make it easier for the user.
Problem being, if this field has the focus I cannot close the form via a command button.
What is the trick here?
Kind regards.
I have the following code in a BeforeUpdate event of a field:-
cmd_PONumberSearch_Click 'activates requery from button
With Me.txt_PONumber
.SelStart = 0
.SelLength = Len(Me.txt_PONumber.Text)
End With
Cancel = True
This is used for continuous searches in a subform and sets focus back on the text field to make it easier for the user.
Problem being, if this field has the focus I cannot close the form via a command button.
What is the trick here?
Kind regards.