P
Pantelis
I use the following code to control the input of a
combobox [cboSelection] to find a specific record in a
form:
Private Sub cboSelect_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "
combobox [cboSelection] to find a specific record in a
form:
Private Sub cboSelect_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "
Code:
= '" & Me![cboSelect] & "'"
If rs.NoMatch Then
MsgBox "No such Code", vbOKOnly
Else
Me.Bookmark = rs.Bookmark
End If
End Sub
The problem is that when NoMatch is TRUE and after the OK
button of the MsgBox is pressed the focus is lost from
[cboSelection] and the user has to move again to the
[cboSelection] to give a new value.
How I can keep the focus to [cboSelection]?
Tanks in advanced
Pantelis