you might have a 'ghost' break, assuming there are no breaks in the code that have been left behind (you'd see the colored dot to indicate this).
Make one small change in the code so that the compile button is enabled. Remove the change you just made, compile and save and try again.
Also, before this point you have not turned off warnings have you? That, in combination to your options on how to handle errors may result in an error not being announced but breaking execution on the error anyway. My suggestion is based on the fact that you did not say any code was highlighted in break mode.
Also, I would assign the value of a DLookup to a variable if it's used more than once because
1) any changes to it's structure must be repeated for every instance of its use
2) each time you use it, you cause Access to evaluate the expression, which in some cases results in unnecessary network traffic.
Last edited by Micron; 01-20-2017 at 04:06 PM.
Reason: clarification
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.