Runtime 2007 error End command

In Access 2007 runtime,  I get these unexplained, until now, runtime errors, 
even though I have error handling.  I have just found that the culprit is the 
End command in my code.  As a test, I created a whole new program with just 
one button with code that says End.  Sure as the dickens, in runtime mode, I 
get a runtime error that cares nothing about error handling.  In macro the 
code runs fine.  Convert it to code and dies.  I have gotten around it by 
replacing End with  goto XX and then locating xx: just above End Sub.  It 
works, but I am reluctant to issue this until I know what is happening.  I 
have done all the normal things that others on this site  have told me, 
including, make accde first, install error handling, remove libraries.   I 
uninstalled Accessruntime and reinstalled   Any ideas?  Going Nuts
0
Utf
12/10/2009 5:07:01 AM
access.modulesdaovba 1670 articles. 0 followers. Follow

6 Replies
592 Views

Similar Articles

[PageSpeed] 57

gg <gg@discussions.microsoft.com> wrote:

>In Access 2007 runtime,  I get these unexplained, until now, runtime errors, 
>even though I have error handling.  I have just found that the culprit is the 
>End command in my code.  As a test, I created a whole new program with just 
>one button with code that says End.  Sure as the dickens, in runtime mode, I 
>get a runtime error that cares nothing about error handling.  In macro the 
>code runs fine.  Convert it to code and dies.  I have gotten around it by 
>replacing End with  goto XX and then locating xx: just above End Sub.  It 
>works, but I am reluctant to issue this until I know what is happening.  I 
>have done all the normal things that others on this site  have told me, 
>including, make accde first, install error handling, remove libraries.   I 
>uninstalled Accessruntime and reinstalled   Any ideas?  

I don't recall ever using End.  I have Exit Sub and Exit Function and
I sometimes forget to remove Stops.   But I don't ever recall using
End.

So I set this up myself.  You're getting the following msg?

Execution of this application has stopped due to a run-time error.
The application can't continue and will be shut down.

If so yup, looks like that's normal behavior.

BTW if I'm doing basic validation at the top of a sub or function and
thus I haven't opened any recordsets or whatever I just do an exit
sub/function.  No sense in even dropping down to the exit routine if
nothing was opened that needs closing.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Tony
12/10/2009 6:38:31 AM
gg <gg@discussions.microsoft.com> wrote:

>In macro the code runs fine.  

In A2003 I don't see the option to use End.  But then i don't know
much about macros.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Tony
12/10/2009 6:39:11 AM
gg wrote:
> In Access 2007 runtime,  I get these unexplained, until now, runtime 
> errors,  even though I have error handling.  I have just found that 
> the culprit is the  End command in my code.  As a test, I created a 
> whole new program with just  one button with code that says End.  
> Sure as the dickens, in runtime mode, I  get a runtime error that 
> cares nothing about error handling.  In macro the  code runs fine.  
> Convert it to code and dies.  I have gotten around it by  replacing 
> End with  goto XX and then locating xx: just above End Sub.  It  
> works, but I am reluctant to issue this until I know what is 
> happening.  I  have done all the normal things that others on this 
> site  have told me,  including, make accde first, install error 
> handling, remove libraries.   I  uninstalled Accessruntime and 
> reinstalled   Any ideas?  Going Nuts

See the help topic:

http://msdn.microsoft.com/en-us/library/aa243356%28VS.60%29.aspx

The End statement effectively ends any code execution, resets all
variables, ... and is generally not recommended in production apps.

-- 
Roy-Vidar


0
RoyVidar
12/10/2009 10:39:44 AM
Thanks much  I'ts something MS should change as they insert end statements 
when you use the macro conversion utility. When I first learned to code, I 
read something that encouraged me to put insert "end" where I wanted things 
to stop.  In any case, a relief to know my problem is not unique and I won't 
have to reload the main program.  Thanks again.

"Tony Toews [MVP]" wrote:

> gg <gg@discussions.microsoft.com> wrote:
> 
> >In macro the code runs fine.  
> 
> In A2003 I don't see the option to use End.  But then i don't know
> much about macros.
> 
> Tony
> -- 
> Tony Toews, Microsoft Access MVP
> Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
> For a convenient utility to keep your users FEs and other files 
>   updated see http://www.autofeupdater.com/
> Granite Fleet Manager http://www.granitefleet.com/
> .
> 
0
Utf
12/10/2009 3:51:02 PM
RAy-Thanks-I am sending yousame reply that I sent Tony in case youdon't read 
other MVP replies.  

Thanks much  I'ts something MS should change as they insert end statements 
when you use the macro conversion utility. When I first learned to code, I 
read something that encouraged me to put insert "end" where I wanted things 
to stop.  In any case, a relief to know my problem is not unique and I won't 
have to reload the main program.  Thanks again.

"RoyVidar" wrote:

> gg wrote:
> > In Access 2007 runtime,  I get these unexplained, until now, runtime 
> > errors,  even though I have error handling.  I have just found that 
> > the culprit is the  End command in my code.  As a test, I created a 
> > whole new program with just  one button with code that says End.  
> > Sure as the dickens, in runtime mode, I  get a runtime error that 
> > cares nothing about error handling.  In macro the  code runs fine.  
> > Convert it to code and dies.  I have gotten around it by  replacing 
> > End with  goto XX and then locating xx: just above End Sub.  It  
> > works, but I am reluctant to issue this until I know what is 
> > happening.  I  have done all the normal things that others on this 
> > site  have told me,  including, make accde first, install error 
> > handling, remove libraries.   I  uninstalled Accessruntime and 
> > reinstalled   Any ideas?  Going Nuts
> 
> See the help topic:
> 
> http://msdn.microsoft.com/en-us/library/aa243356%28VS.60%29.aspx
> 
> The End statement effectively ends any code execution, resets all
> variables, ... and is generally not recommended in production apps.
> 
> -- 
> Roy-Vidar
> 
> 
> .
> 
0
Utf
12/10/2009 3:53:02 PM
gg <gg@discussions.microsoft.com> wrote:

>Thanks much  I'ts something MS should change as they insert end statements 
>when you use the macro conversion utility. 

I never knew that.  Thanks.

>When I first learned to code, I 
>read something that encouraged me to put insert "end" where I wanted things 
>to stop.  In any case, a relief to know my problem is not unique and I won't 
>have to reload the main program.  Thanks again.

Glad I was of some assistance as confused as I was.

Tony
-- 
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files 
  updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
0
Tony
12/10/2009 8:51:55 PM
Reply:

Similar Artilces:

Project Server 2007 Implemenation costs
Hello, I want to implement Project Server for web access to 50 users. We already have MS Project 2007 installed on all PC's running XP operating system. I know I will need a Project Server License and 50 CAL, but what other costs are involved? Thank you. Hi Flyingrat, You'll need to make sure your Project version is Project 2007 Professional. In addition to a Windows Server, you'll also need SQL Server and the relevant SQL CALS, one CAL for each Pro user AND each web user. -- Regards, Ben. "Flyingrat" wrote: > Hello, > > I...

Print Command Button Corrupted
Hi Guys, Does anyone know how to recreate a corrupted button in Excel 2000? Basically the Print button comes up with error messages when I press onto it. Printing works fine if you select from the File menu, it is just the button. I thought there was a tool to recreate buttons but cannot find it. I have also run detect and repair which did nothing (Surprise surprise! lol) Any ideas would be much appreciated. Try this: In Excel XP, View, Toolbars, Customize. Select the Standard toolbar and Click the Reset Button. Note, that this will cause any customization that you may have made to you...

Error with VBA code
I am having error with this statement. Do anyone know what's the error with this line: ..CheckBoxes(i).Value = False Dim i As Integer For i = 1 To 19 ..CheckBoxes(i).Value = False Next i I would guess that you have fewer than 19 checkboxes. -- Jim <xiaodan86@hotmail.com> wrote in message news:1178702221.638576.248520@q75g2000hsh.googlegroups.com... |I am having error with this statement. Do anyone know what's the error | with this line: | .CheckBoxes(i).Value = False | | | Dim i As Integer | For i = 1 To 19 | .CheckBoxes(i).Value = False | Next i | ...

Chart wizard funcitonality in Excel 2007?
I hope I'm missing something in Excel 2007. In Excel 2003, the chart wizard gives you access to lots of options when you create a graph--graph type, data range, the various series (including the X axis labels), the chart title and axis titles, gridlines, legends, and others. It doesn't take long to create the graph with most of the options you want and then tweak it pretty quickly. In Excel 2007, it seems that every option is a separate button/menu/choice. Setting the chart title, the x-axis title, and the y-axis title are three different operations. Ditto for pretty much everyt...

Error removing replica from "SYSTEM CONFIGURATION" Public Folder
I want to remove an Exchange server from the replication tab on the "SYSTEM CONFIGURATION" public folder (Exchange System Folder). I am logged on with full rights however when I remove the server I get prompted for a username and password. No matter what I type I cannot remove any of the servers and eventually I get this error:-- "Exchange System Manager The operation failed. ID no: 80004005 Exchange System Manager OK" Any ideas? I am running Exchange 2003 with SP1. DB, Is the other machine inaccessible? You might want to try turning it back on and then remove t...

Outlook 2002 and Retrieving Data Error Message
OS is Windows XP SP1 Email - Outlook 2002 SP3 Error Message: Outlook is retrieving data from the Microsoft Exchange Server <server name>. You can cancel the request or minimize this message to the Windows taskbar until Outlook closes the message automatically. Other Related Issues: At times, the message displays the correct server name and sometime it does not. At times, it displays the name of an active directory server. This only happens to workstations located in an remote office connecting to the exchange server via ADSL\VPN connection. We have one exchange 2003 server - public...

divide so no error Excel 2007
I have a simple issue. I have two cells with numbers and I want to divide one by the other and set it up on many cells. Problem is if I enter the folmula befor there are actually numbers in the two cells I get the Divide by 0 error (#DIV/0!) So How can I divide A2 / B2 only if it won't produce an error? =IF(B2=0,0,A2/B2) -- Regards, Peo Sjoblom "Striker" <striker3070@qwest.net> wrote in message news:%23CnsJAoRJHA.5244@TK2MSFTNGP04.phx.gbl... >I have a simple issue. I have two cells with numbers and I want to divide >one by the other and set it up ...

Any idea why this is giving me a #Value! Error?
Function FrstLtrs(MyStr As String) As String Dim temp Dim i As Long TmpStr = Split(Trim(MyStr)) 'MsgBox "String" + TmpStr For i = 0 To UBound(TmpStr) If Not (UCase(TmpStr) = "OF") And Not (UCase(TmpStr) = "FOR") And Not (UCase(TmpStr) = "THE") And _ Not (UCase(TmpStr) = "AND") And Not (UCase(TmpStr) = "A") Then If Asc(Left(TmpStr(i), 1)) >= 65 And _ Asc(Left(TmpStr(i), 1)) <= 90 Then FrstLtrs = FrstLtrs & Left(TmpStr(i), 1) End If End If Next End Function Find the mo...

Money 2007 fails additional update
I am trying to use Money 2007 Premium on my new computer (Windows XP SP2) and it installs fine, but when I start Money it notifies me that an additional update is required. It looks like it downloads the files properly but fails the add'l install. I have tried the following: uninstall and install again turn off all virus protection (Panda) firewalls, etc. download directly from the web None of these have helped. I saw one article on this problem that said to remove a Core File, but I can not find it on my computer. Please help. -- Josie In microsoft.public.money, Josie wrote...

Outlook 2007 add-on
Hello everybody! Wonder is there any outlook 2007 add-on that can show related email messages (even if exchanged between 2, 3 or more persons), based on the similarity of emails' contents? I know Outlook 2007 has the option to arrange columns per "conversation" but if 2 messages have same content with different subjects, they are not included in the "conversation" display.. Any ideas here? Thanks in advance! Steve Tried Xobni? --=81 Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal ...

Cusotm Office 2007 install for English, Spanish, & Chinese users
Hi, I'm working on creating a custom install of Office 2007 for my various sites. These sites include users that speak English, Spanish and Chinese. I am a bit confused on how to use language packs in order to provide multi-lingual support. From my understanding, I need to download the Spanish and Chinese language pack and place the .msp files in the Updates folder on my network install point? Does this mean when office gets installed on a Chinese computer it will be in Chinese automatically? Or does the user need to "flip a switch" to make it Chinese language? The ...

HELP- error Outlook
What's this mean and how to fix? in error dialogue box: "c:\program~1\micro~2 \office\outlook.exe" Abnormal program termination .. ...

Conversion error 05-09-04
I am using access 2003. When I link or import tables from Excel XP I get a Coversion Error table for those fields which contain user defined functions. I would appreciate it if you could susgest how I can remedy this problem. Thanks, Richard Richard ...

backup same set of servers from 2 DPM 2007 servers
I am changing the DPM server 2007. However, I would like to take this opportunity to revise all protection groups so that I can restore bare-metal any server from a single lTO-4 tape if possible. During this "transitional period," I would like to leave the existing backup settings on the older DPM server to continue to run while adding jobs to the new DPM server. Looks like to me that I have to re-install the agent on all servers so that they can be recognized by the new DPM server. IS there a better way to do this if my plan is possible at all? Thanks Bill ...

HTTP Error 401.2
Hi, I have installed MS CRM 1.2 on my Domain controller running windows 2003 standard server and email router on exchange 2003. My local ip subnet is 172.0.0.x With ms vpn connection, I can access to ms crm by using outlook 2003 or internet explorer by opening the default ms crm page remotely. However, if i connect to ms crm with different subnet 10.0.0.x, i cannot connect to ms crm. 10.0.0.x subnet is routed to 172.0.0.x, where my users normally login email from the exchange 2003. What puzzle me is why i can authenticate from exchange 2003 but not ms crm server on using the same...

'Microsoft Visual C++ Runtime Library Runtime Error! 2nd Request
I just upgraded my Dell PII 400 from W2000 SP4 to WXP SP1. I was having a lot of problems with Outlook XP crashing multiple times while in use, which was 1 reason for the upgrade, as Outlook is current, with all available updates having been applied. Under XP, when I start Outlook, 9 out of 10 times I get a message box entitled: 'Microsoft Visual C++ Runtime Library' with the text: 'Runtime Error! Program: C:\PROGRA~1\MICROS~2\Office10\OUTLOOK.EXE abnormal program termination.' When I click OK, Outlook closes. The next time, it starts OK, but has to scan the Personal f...

Downloading process for Office Standard 2007 online
I experienced a severe computer failure and when it was repaired, I lost my installed programs. I need to get back on Outlook and Word, but only have the program key for the Office Standard 2007 program. How do I get to the screen where I can input my program key to get the process started? You need the Office installation cd in order to reinstall "Jack" <Clear@view.com> wrote in message news:8777DDC2-9BED-4B0D-8EC0-F1A35D5DE37C@microsoft.com... >I experienced a severe computer failure and when it was repaired, I lost my > installed programs. I need to get...

Polling Error
I keep receiving this error when polling one location. "<<Post Message>> No response was received for Message Type 3 (Worksheet Status) We are running RMS V1.2 sp2. The site polls to HQ twice a night. The worksheet is a 401. We get the store data and batch information but it disrupts the interstore transfers. any Help? I'd start checking the event viewer logs on all machines involved, and any other logs the transfer program might have as a start... "Paul Houston / Eastern National" wrote: > I keep receiving this error when polling one location. > &q...

Using tables created in 2003 IN 2007
My office has recently upgraded to 2007. I enjoy new features such as the ability to highlight a few words within the table without the ENTIRE table's font changing; unfortunately, this only works in tables I have created since the upgrade. My old tables that were brought over from 2003 do not have this capability. Is there an add-on out there? I do not have to resort to re-typing and creating all new tables. PS. Copy and pasting into a new table does not work. Convertting the file using the office button does not work. Help? please? I think you talking about what is called...

Error Code 800ccc0f
Hi. I´ve gotten the error code above with protocol IMAP. The port is correct. And the account and server name are correct too. I can´t even move a message from one file to other. Can someone help me? Thanks. Renato Please post the complete error message. Error Code 800CCCOF can be many different things depending what the error say's -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. http://www.microsoft.com/protect "Renato-Brazil" <Renato-Brazil@discussions.micros...

error message 80080005
all the answers on the board are from last year windows vista home premium 32 bit Hello Larry, Fresh from 2010 http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.windowsupdate&p=1&tid=887cb668-67b2-4b8f-bbe3-09c97244db84&mid=887cb668-67b2-4b8f-bbe3-09c97244db84 "larry" wrote: > all the answers on the board are from last year > > windows vista home premium > > 32 bit Hello Larry, Fresh from 2010 http://www.microsoft.com/communities/ne...

unknown error message
what does this message mean and how do i correct it. 553 sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1) ...

excel error "no more new fonts..."
Using Excel 2002. Pretty large sheet with about 60 tables. refuses to copy and paste a table. Getting error message "no more new fonts may be added to this workbook" cannot find anything anywhere on this error. ...

Can I add additional emoticons to Communicator 2007?
I would like to increase the available emoticons in Communicator 2007. Anyone know how? AFAIK, you can't but this would be better asked in the Communication server forums. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LSOFT.COM Poll: What version of Outlook do you use? http://forums.slip...

Excel 2007
Hi all, We have a spreadsheet that was set up to link to a database via a system DSN. To simplify deployment of this, I'd like to change this to connect via the connection string below: DRIVER=SQL Server;SERVER=xxx;UID=xxx;PWD=xxx;DATABASE=xxx; I've done this for another spreadsheet, and it was easy (Data tab- >Connections->Properties), but in this next spreadsheet the Connection Properties for one connection are greyed out/disabled, so I can't change the string. Does anyone have any ideas how to enable these values again so I can change the connection string? thanks! ...