Run-time error '7878' - The data has been changed.

J

Jeff

Hi,

I have a form with a subform associated with it. When the value of a
drop-down field on the subform is changed to a specific value, I need
it to update a date field on the parent. However, when it runs the
first time, I get a "Run-time error '7878' - The data has been
changed." error message.

The second, third, etc. times that I run the same thing, it updates
correctly and no errors pop up. Any ideas?

Thanks,
Jeff

Here's the code that's bombing out:

-------------------------------------
If Me.PrelimAction.Value = 1 Then
'change the denial's status to requested medical records
SQLtext = "UPDATE tbl_PCM_Denials SET tbl_PCM_Denials.DenialStatus
= 3 " _
& "WHERE
(((tbl_PCM_Denials.DenialID)=[Forms]![frm_PCM_DenialFollowup]![DenialID]))"
DoCmd.RunSQL SQLtext
'populate the medical record due date field
If Form_frm_PCM_DenialFollowup.NumDaysToAppeal.Value > 60 Then
'if the number of days to appeal is greater than 60, give
'medical records 30 days to get back to you
Form_frm_PCM_DenialFollowup.MedRecordDueDate.Value = Date + 30
Else
'else only give 20 days
Form_frm_PCM_DenialFollowup.MedRecordDueDate.Value = Date + 20
End If

'and open the send medical request form
DoCmd.OpenForm "frm_PCMSendMedRequest"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top