DataBase - run time error -2147352567
Asked By Melissa
27-Jan-10 02:20 PM

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 am using has several subforms and if the data
in these subforms are "dirty" then I get this error. Any suggestions would
be appreciated.
--
Thanks.
VBA
(1)
VbYesNoCancel
(1)
Report
(1)
StrRQD
(1)
PurchaseOrders
(1)
AcViewPreview
(1)
NotMet
(1)
StrMessage
(1)
genegal replied to Melissa
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.

Outlook (1) I should note that I am using the data macro to call a VBA function (by setting a local macro variable to the result of the function call). So this is not for the web, I did not see a problem with calling a VBA function (and various places I have seen online mentioned workarounds for calling VBA from a data macro). But, again, while it works when I insert a record in note? In it I added that I was using the AfterInsert macro to run some VBA code (by setting a local variable to the result of a function call). Maybe that maybe that is the problem Yes, in this case, you need a copy of the VBA in the front end. (for testing you can place it in both - since if you happen to open the back end table directly, then the VBA code is ALSO required since the front end might not even be open and the talk to that may be sitting on your computer. So when the trigger fires, that VBA code will be required. So, the VBA needs to exist in the front end if that all you opened. However, if you
1 + 1 messagebox "One " & 1 + 1 messagebox One and the results were One In older VBA, I could do msgbox "Today is " & Date() and it would display Today is 11 / 23 that info on that would be appreciated. Access Discussions Y1pV0NrTr6kZF89YQf6BnUUodaeTLeRvn9 (1) SharePoint (1) PleaseNOOSpamKallal (1) VBA (1) VB (1) Debug.Print (1) CurrentWebUser (1) SetTempVar (1) I quite sure how this go to Action2 and insert it somehow? Is Macros the way to start thinking now? VBA old school, new way Macros? There being so much info in these posts, I forget the actions one can perform on the web are defined) or can it also run VBA code in a web app as well? This is the part that bothers me the e., a codeless Access application that would not violate paranoid IT departments' policies about running VBA code), but now it is quite clear that they have been heavily leveraged. The table an app that started life in Access 2 and had not a single line of VBA code (all macros). It was a real tangle and incredibly difficult to forecast what effect http: / / www.dfenton.com / DFA / An autoexec macro is about all I have ever used, VBA being the replacement so I know what you mean. It will be a switch, but does move code blocks up or down (and I LOVE this feature. . and wish the VBA editor could do this). However, To insert, just drag the command from the action catalog
I use the evaluation function in the reports only and run it via = sql on report open, it would then assign that Risl Level value to an unboun = d field on and targets, with or wi = thout casualties, etc. . . Can you walk me through either way VBA or Query please? I am e self learner = and quite new in this level of use the evaluation function in the reports only and run it vi = a sql on report open, it would then assign that Risl Level value to an unbo = und field on I use the evaluation function in the reports only and run it = via sql on report open, it would then assign that Risl Level value to an un = bound field on there could well be several different issues to examine here, = not just your question about VBA recordsets and functions. For instance - - it seems that you are examining a set of events use the evaluation function in the reports only and run it vi = a sql on report open, it would then assign that Risl Level value to an unbo = und field on how I would suggest doing it. However, = instead of putting the code in either a report or a form I would put the c = ode behind a query as a user UDF showing how to make the current record of a ' running saved query available to VBA directly from the query ' without using a form, using the query name and the primary
reusable for more than one client. So we now develop to a office standard (and VBA). Our next and software for the cloud will be built to the sharepoint standard (at shape to be compatible for upload? But not with native Access forms. Not with standard VBA. This means it may be *similar* to Access (and thus very easy for us to web, and one for local. In fact you can even execute an open form from VBA and openform works fine if you feed it a web form name. as mentioned, you can have a mix of VBA forms, and web only forms in the same application. When you publish the application, those help you trace the interconnections between all the macros, the same way you can with VBA. This is my biggest concern about all of this, that by going to macros, you client and the web. However for some things like payroll processing etc then you need VBA. Obviously only the controller / accountant person in your organization will need the advance VBA part of the application. For employees to enter their time sheets and hours, check their not for a very, very long time (despite the false dawn of Office 97 with VBA as platform for developing complex meta-apps for small businesses). I do not quite understand
VBA vs Macros DataBase Let me preface this by saying it is a sincere question. I Using Access 2010 I note that help tells us to use macros in preference to VBA for web apps and for greater security. Also a VBA to macro converter is provided but not the other way around. Why so down on VBA? Once upon a time it was considered that for any serious development VBA was preferred to macros because it had a) error trapping (where untrapped errors would crash runtime installation of Access) and b) greater power and flexibility. Are these two advantages of VBA over macros still true with 2010? Other than for web apps (which I am not doing) should I change to macros or stick with VBA? When I took up Access I learned VBA and only did macros when it was the only way for certain operations. Other than