I did some research. Most of the people had problems with fields that aren't visible, subforms, setting focus to a form without controls, etc.
That's not the case here. The problem happends in two procedures, sporadicly, and in one procedure the F5 works better than in the other, as to continue the program.
This seems to be a problem with Access for at least 5 years.
I tried moving the offending line up in the code, but that doesn't seem to make much difference, it just becomes more sporadic.
You can't move focus to a control that already has focus, I'm not sure if that situation could apply randomly?
Totally unrelated: I would also always use Me. instead of Me! just because it checks the syntax pre-compilation.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓