Alias90,
Hmmmmmmmm. Part of me wonders why you would have code like this, to enter a value into a text box, then simply clear it out after you enter it? I can speak with certainty, but it appears that once you update a control, you can't simply reset the focus to it, you must set it elsewhere first. This would not be the first quirky aspect of Access.
I know a workaround is to set the focus to another control, then set it back to the original control. Which works, but from a programmer's standpoint, is mindless....
If the only goal in this is to clear the contents of txtkanban and set the focus to that control, this will work, but still unsure of the purpose.
See below:
-
Option Compare Database
-
Option Explicit
-
-
Private Sub txtkanban_AfterUpdate()
-
Me.txtkanban = ""
-
Me.txttong.SetFocus
-
Me.txtkanban.SetFocus
-
End Sub
-
Hope this solves your problem.....