Ms Access Error 2501 The Openreport Action Was Cancelled
Contents |
Search Community Links Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find
Ms Access Error 2501 The Openform Action Was Cancelled
All Thanked Posts Go to Page... Page 1 of 2 access run time error 2501 outputto action was canceled 1 2 > Thread Tools Rating: Display Modes 02-05-2007, 02:33 PM #1 ShanVel ShanMug Join access 2010 error 2501 Date: Oct 2005 Location: Akron, OH, USA Posts: 51 Thanks: 0 Thanked 0 Times in 0 Posts Run-time error 2501; OpenReport action was cancelled Folks, Need your help. I
Error 2501 Access
searched the entire forum and found couple of postings on this, but none of them indicates if there is any fix for this problem. If there is no data, basically I want to show a message and close the report. I have some code to handle this under no data event like below: Private Sub Report_NoData(Cancel As Integer)
Run Time Error 2501 The Runmacro Action Was Canceled
MsgBox "There is no data for this report. Canceling report..." Cancel = True End Sub But this 2501 always pops up and I couldn't find a way to stop this. I also searched Microsoft knowledgebase, no help. Here's how my clik event procedure looks like: Private Sub cmdSearch_Click() On Error GoTo Err_PreviewRprt Dim strTbl As String Dim strSQL As String Dim strOptItem As String Dim strOptBlrType As String Dim strMsg As String, strTitle As String Dim intStyle As Integer 'Set up SQL statement for report record source If IsNull(optCriteria) Then optCriteria = 1 strTbl = Me.cboTypeOfGuar.Column(0) strOptItem = Choose(optCriteria, "memPred", "memGuar", "memRiskLevel", "memLDs") strOptBlrType = Choose(optBoilerType, "SWUP", "RB", "CFB", "All") strSQL = "SELECT tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, tblProjts1.chrBoilerType, " & _ strTbl & ".memGuranItem, " & strTbl & "." & strOptItem & _ " FROM tblProjts1 INNER JOIN " & strTbl & " ON " & _ "tblProjts1.intProjectId = " & strTbl & ".intProjectId" & _ " WHERE (((" & strTbl & ".memGuranItem)" & " IS NOT NULL)" & " AND " & "((tblProjts1.chrBoilerT
be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want the openreport action was canceled access 2003 to visit from the selection below. Results 1 to 7 of 7 Thread: Run-time Error
The Openreport Action Was Canceled Access 2007
'2501' Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 04-06-06,18:55 #1 nckdryr View Profile View Forum Posts Computer Monkey Join Date May 2005 Posts 1,191 Unanswered: Run-time Error '2501' Hey guys, I've been having troubles with access. The database is stored on http://www.access-programmers.co.uk/forums/showthread.php?t=122481 the network drive and is accessed by multiple users. One user has been having troubles just recently in using a search form I created on the database (his screenshot with the error is attached). Over the last month, when he tries to use the search form, he will occasionly get this error message. When you click the Search button, the form is supposed to pull up a report that is based on a query http://www.dbforums.com/showthread.php?1215163-Run-time-Error-2501 that has its criteria from the form (hope that makes sense). But he (and as far as I know, only he) has been having this problem. Does anyone know what may be causing this? Has anyone seen this problem before? And, more importantly, does anyone know how to fix it? Thanks in advance to anyone who can help. Attached Thumbnails Me.Geek = True Reply With Quote 04-06-06,21:30 #2 tcace View Profile View Forum Posts Registered User Join Date Apr 2004 Location outside the rim Posts 1,011 As indicated in your screenshot, the OpenReport action was canceled. Run Time error 2501 most often occurs when something is Canceled. For example, if a report is sent to the printer using the OutputReport action and the user hits cancel while it is spooling, it will return error 2501, which you can trap. Also, if the OpenForm method is called and something causes the form to cancel opening (either Cancel was set to True during open, or an unhandled error occurs, triggering Cancel = True) then error 2501 is triggered. There are other ways to get 2501, almost all of them involve canceling an operation. I suggest you place an error trap in the procedure that opens the report. If Err.Number = 2501, then the user hits cancel. If the Err.number is anything else, post
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 21:11:30 GMT by s_wx1126 (squid/3.5.20)