run time error -2147352567

M

Melissa

Help! I keep getting run time error -2147352567 "The data has been changed"
on my form. The error is generated when I click on a button the opens up a
report for me. Here is the VBA. (Submitting just tells if strRQD is "NotMet")

Private Sub Command53_Click() 'Print Preview
Call Submitting

If strRQD = "NotMet" Then
strMessage = strMessage + Chr(13) + strDetails + Chr(13) + "Would you
like to print these issues on the report?"
Select Case MsgBox(strMessage, vbYesNoCancel)
Case 6 'Yes
Me.IssuesComments = strDetails
Me.Refresh
DoCmd.OpenReport "PurchaseOrders", acViewPreview

Case 7 'No
Me.IssuesComments = Null
Me.Refresh
DoCmd.OpenReport "PurchaseOrders", acViewPreview
End Select
Else
DoCmd.OpenReport "PurchaseORders", acViewPreview
End If
End Sub

The runtime error occurs on the Me.IssuesComments = Null or
Me.IssuesComments = strDetails lines.

I should also add that I have tried numerous ways to use the Me.Refresh and
Me.Requery before these lines of code and they are not working. I think the
problem might be that the form I'm using has several subforms and if the data
in these subforms are "dirty" then I get this error. Any suggestions would
be appreciated.
 
G

genegal

When you use strRQD, are you referring to strRQD as a name of a field (in
which case, it should be entered as [strRQD] = "NotMet") or are you referring
to a string that has been declared somewhere?

Just trying to fit the pieces of the puzzle here.
 

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