"Phil Stanton" <phil@myfamilyn ame.co.ukwrote in message
news:OcidndqaHO hrKkfVnZ2dnUVZ8 uidnZ2d@posted. plusnet...
AIUI the SendKeys method is frowned upon because it can send to whatever
window has the focus, be it your Access application or anything else.
Keith.
news:OcidndqaHO hrKkfVnZ2dnUVZ8 uidnZ2d@posted. plusnet...
You might try
>
Private Sub MyControl_Befor eUpdate(Cancel As Integer)
>
If Nz(MyControl) = "" Then
MsgBox "Someting required"
Cancel = True
SendKeys "{ESC}"
End If
>
End Sub
>
>
Private Sub MyControl_Befor eUpdate(Cancel As Integer)
>
If Nz(MyControl) = "" Then
MsgBox "Someting required"
Cancel = True
SendKeys "{ESC}"
End If
>
End Sub
>
window has the focus, be it your Access application or anything else.
Keith.
Comment