I have a form where I enter various data, some combo boxes, one check box and a memo field. I have a command button on this form that will change the check box to "true". However sometimes when I click the button I get a "runtime error 7878 data has changed" error. It usually happens after I enter notes in the memo field and then attempt to click the command button.
I have tried a save command etc. When I debug it always stops at the line where I am trying to change the value of the check box. I currently have put in a requery command and it seems to work better but there are sometimes it tells me I can't requery etc.
I am using this check box to change the state of the command button and display a different caption on that button which will route to a different function.
I have even tried posting the command button in a subform to trigger a save command but that resulted in the same error.
Here is the code.
You can see the requery that I have added but it doesn't always work. Any insight into how I can stop this message or error?
Private Sub cmdTask_Click()
Notes.SetFocus
If Forms!Contacts!CallNotesSub!Task = True Then
Call fncFindOutlookTask
Else
Forms!Contacts!CallNotesSub.Requery
Forms!Contacts!CallNotesSub!Task = True
Call fncAddOutlookTask
End If
End Sub
I have tried a save command etc. When I debug it always stops at the line where I am trying to change the value of the check box. I currently have put in a requery command and it seems to work better but there are sometimes it tells me I can't requery etc.
I am using this check box to change the state of the command button and display a different caption on that button which will route to a different function.
I have even tried posting the command button in a subform to trigger a save command but that resulted in the same error.
Here is the code.
You can see the requery that I have added but it doesn't always work. Any insight into how I can stop this message or error?
Private Sub cmdTask_Click()
Notes.SetFocus
If Forms!Contacts!CallNotesSub!Task = True Then
Call fncFindOutlookTask
Else
Forms!Contacts!CallNotesSub.Requery
Forms!Contacts!CallNotesSub!Task = True
Call fncAddOutlookTask
End If
End Sub