G
Guest
In a Before Update routine, I check for a null value in a control. If there is a null value, I want the cursor to go back to where it was. As it is now, it continues on to the next tab stop. I've used the Me!Control.SetFocus before, but when it's imbedded within an IF statement, it doesn't work like I want it to. Below is my routine
If IsNull(Me!boxsickbal) The
strMsg = "No Sick Leave Available.
intStyle = vbOKOnl
strTitle = "Leave Balance Check
MsgBox strMsg, intStyle, strTitl
Me!boxLeaveType.SetFocu
End I
I've even tried placing the SetFocus statement after the IF statement. Doesn't work there either
Everything else seems to be working right, just the SetFocus part. What am I Missing here? As usual, thanks in advance for all your help
JM
If IsNull(Me!boxsickbal) The
strMsg = "No Sick Leave Available.
intStyle = vbOKOnl
strTitle = "Leave Balance Check
MsgBox strMsg, intStyle, strTitl
Me!boxLeaveType.SetFocu
End I
I've even tried placing the SetFocus statement after the IF statement. Doesn't work there either
Everything else seems to be working right, just the SetFocus part. What am I Missing here? As usual, thanks in advance for all your help
JM