Forum Discussion
Ajoy Das
Feb 24, 2021Copper Contributor
Access error screen does not close after Ok button of error message is clicked
Access error screen does not close after the OK button of the error message is clicked I have been using Microsoft Office and Access for decades, But have never before faced a problem like th...
George_Hepworth
Feb 26, 2021Silver Contributor
Again, apologies for the lack of clarity. What I meant is that the error is possibly (probably) caused when the Before Update event of that control runs because the value attempted is not valid. That triggers the error message. In the meantime, however, Access has tried to move focus to a new control, possibly because you clicked or tabbed to it. But it can't move focus because of that error, so the error message is displayed again, and into the loop it goes.
Note that, in my example, I highlighted two lines of code.
Cancel = True
.cboTestTimeOfDayID.Undo
Cancel stops the event from firing. Undo removes the invalid entry from the control. Together, they should forestall the repeated error.
However, I'm really only guessing based on experience. Try it out and see what results you get.
Note that, in my example, I highlighted two lines of code.
Cancel = True
.cboTestTimeOfDayID.Undo
Cancel stops the event from firing. Undo removes the invalid entry from the control. Together, they should forestall the repeated error.
However, I'm really only guessing based on experience. Try it out and see what results you get.
Ajoy Das
May 03, 2023Copper Contributor
No really. You may try restarting the computer at that stage. It might work.
- Isla37Jun 20, 2023Copper Contributorrestarting didn't work, is there any other ways?
- Ajoy DasJun 25, 2023Copper Contributor
You may try by undoing the action in the midst of which it happened by clicking on the reverse button arrow at the top left of the screen.
- BeverlyJMcKJul 31, 2023Copper ContributorI found that if I hold the Esc key for a couple of seconds the error goes away.
- HaNguyen1207May 03, 2023Copper Contributor
Ajoy Das It seems like that is the only way.. Thank you for your reply!