setfocus

krishnanhemanth

Registered User.
Local time
Today, 18:54
Joined
Jun 12, 2009
Messages
115
hi
i have a field called qty and qtyrcvd
if the user input in the field qtyrcvd is not equal to qty then
it should stfocus on the field and undo the entry
how do i do this

thanks i advance
 
Try the following in the Form's AfterUpdate Event
Code:
If Me.qtyrcvd <> Me.qty Or IsNull(Me.qtyrcvd )Then
     Me.qtyrcvd = Null
     MsgBox "qtyrcvd Must = qty"
     Me.qtyrcvd.SetFocus
End If
 

Users who are viewing this thread

Back
Top Bottom