C
Clau
I have a form (loan) where I have a ComboBox (BookCode) and in that
combobox I´ve created the following event:
Option Explicit
Option Compare Database
Private Sub BookCode_BeforeUpdate(Cancel As Integer)
If Status = "Lent" Then
MsgBox "The book is not available"
End If
End Sub
so far this works, but I need to add a setfocus to fix the mouse pointer
to the ComboBox and I have no clue on how to continue... someone suggessted
to add:
Me.BookCode.SetFocus
and I added it before the End If... but it didn´t work....
Can anyone help ???
combobox I´ve created the following event:
Option Explicit
Option Compare Database
Private Sub BookCode_BeforeUpdate(Cancel As Integer)
If Status = "Lent" Then
MsgBox "The book is not available"
End If
End Sub
so far this works, but I need to add a setfocus to fix the mouse pointer
to the ComboBox and I have no clue on how to continue... someone suggessted
to add:
Me.BookCode.SetFocus
and I added it before the End If... but it didn´t work....
Can anyone help ???