Access error screen does not close after Ok button of error message is clicked

%3CLINGO-SUB%20id%3D%22lingo-sub-2164932%22%20slang%3D%22en-US%22%3EAccess%20error%20screen%20does%20not%20close%20after%20Ok%20button%20of%20error%20message%20is%20clicked%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2164932%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-subject-wrapper%20lia-component-subject%20lia-component-message-view-widget-subject-with-options%22%3E%3CDIV%20class%3D%22MessageSubject%22%3E%3CDIV%20class%3D%22MessageSubjectIcons%20%22%3E%3CSPAN%20class%3D%22lia-message-read%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Faccess%2Faccess-error-screen-does-not-close-after-ok-button-of-error%2Fm-p%2F2164928%22%20target%3D%22_blank%22%3EAccess%20error%20screen%20does%20not%20close%20after%20the%20OK%20button%20of%20the%20error%20message%20is%20clicked%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-body%20lia-component-message-view-widget-body%20lia-component-body-signature-highlight-escalation%20lia-component-message-view-widget-body-signature-highlight-escalation%22%3E%3CDIV%20class%3D%22lia-message-body-content%22%3E%3CP%3EI%20have%20been%20using%20Microsoft%20Office%20and%20Access%20for%20decades%2C%20But%20have%20never%20before%20faced%20a%20problem%20like%20the%20one%20I%20am%20going%20to%20describe%20below%20before%20the%20current%20version%20of%20Windows%2010.%3C%2FP%3E%3CP%3EWhen%20by%20mistake%20a%20data%20type%20different%20from%20the%20one%20provided%20for%20is%20inserted%20in%20a%20field%20an%20error%20message%20pops%20up%20saying%20%22you%20must%20enter%20a%20value%20in%20the%20field%2C%20with%20two%20buttons%20'OK'%20and%20%22Help%22%20at%20the%20bottom%20of%20the%20error%20screen.%20When%20OK%20or%20cross%20at%20the%20top%20right%20of%20the%20screen%20is%20clicked%20the%20error%20screen%20should%20go%20to%20enable%20entry%20of%20correct%20data%20in%20the%20related%20field.%20But%20this%20does%20not%20happen%3B%20the%20screen%20only%20blinks%20when%20either%20the%20OK%20button%20below%20or%20the%20cross%20on%20the%20top%20right%20is%20clicked.%20I%20tried%20several%20times%20with%20the%20same%20result.%20I%20went%20for%20the%20online%20repair%20of%20Office%20365%20and%20tried%20again%20but%20the%20result%20had%20been%20the%20same.%20Request%20a%20solution%20as%20early%20as%20possible%20from%20anyone%20in%20the%20tech%20community.%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2164932%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

I have been using Microsoft Office and Access for decades, But have never before faced a problem like the one I am going to describe below before the current version of Windows 10.

When by mistake a data type different from the one provided for is inserted in a field an error message pops up saying "you must enter a value in the field, with two buttons 'OK' and "Help" at the bottom of the error screen. When OK or cross at the top right of the screen is clicked the error screen should go to enable entry of correct data in the related field. But this does not happen; the screen only blinks when either the OK button below or the cross on the top right is clicked. I tried several times with the same result. I went for the online repair of Office 365 and tried again but the result had been the same. Request a solution as early as possible from anyone in the tech community.

5 Replies

@Ajoy Das 

Which event triggers this error? It could be that you are in a loop where the error is raised over and over because you need to undo a control that has the invalid attempted value in it, but until you remove that invalid value, the same error is raised again. I'm thinking perhaps a Before Update event would be the most likely.

@George Hepworth

Hi George

                No, this is not a loop event. It occurred when I opened the Access app and was entering the first record of the day while erroneously entered a data of type different from what was set up for that field.

                No. It was not Before the Update situation. The office 365 and Windows update were both up-to-date when this happened.

                

 

@George Hepworth 

@Ajoy Das 

Sorry, perhaps I was not as clear as I hoped. I'm not talking about an update to the software. I'm talking about an Update event in a control on the form. Like this example, where failing to cancel and undo the attempted invalid entry sends the event into a loop as it tries to update, can't because of the response to the question, but still has the wrong value, so it triggers the before update event again. 


Private Sub cboTestTimeOfDayID_BeforeUpdate(Cancel As Integer)

Dim lngMealItemCount As Long

 

With Me
    If MsgBox(Prompt:="Click ""Yes"" to confirm you want to change this meal.", _
        Buttons:=vbYesNo + vbCritical, _
            title:="Change a Saved Meal?") = vbNo Then
        Cancel = True
        .cboTestTimeOfDayID.Undo
    End If  
End With
Exit Sub


End Sub

Hi George
I am sorry I am not a technical person and as such not in a position to understand what you have meant to say. I wou[d be thankful if you kindly guide me in layman's language as to how to I can resolve this issue, whatever be the reasons. As I have said, I have been using MS Access for decades but have never before come across such a problem. In the alternative, you may advise if you are aware, of how to contact MS Access Support staff for a chat session for resolving this issue. I had tried through the Access Help option but the lady support staff to whom the chat session was entrusted by MS said I had landed in the Download and installation wing of office 365. As advised by her, I have brought the matter here for a plausible solution
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.