Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 23rd, 2008, 09:07 AM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Novel bug, hoping someone can help

One of my old databases written in access 2003, which I am resurrecting and updating, has developed a rather novel bug which even with a breakpoint on the error trap isn't showing up as to what's causing it.

On forms with a close form button, generated by the wizard, when the button is clicked the whole database shuts down.

all that is in the click event is the standard text that's generated by the command button wizard:

Private Sub cmdcloseform_Click()
On Error GoTo Err_cmdcloseform_Click

    DoCmd.Close

Exit_cmdcloseform_Click:
    Exit Sub

Err_cmdcloseform_Click:
    MsgBox Err.Description
    Resume Exit_cmdcloseform_Click

End Sub

Any help as to what is causing it would be grateful. I can stop it with making it deambiguous so that's not the real issue. Its what is causing it and why.

Reply With Quote
  #2 (permalink)  
Old June 23rd, 2008, 03:35 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Hi, Jeremy. Instead of DoCmd.Close it's doing a DoCmd.Quit! Interesting. Have you tried entering the rest of the parameters after the close method to be specific? For example,

DoCmd.Close acForm, "Your Form Name", acSaveNo


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
  #3 (permalink)  
Old June 24th, 2008, 11:18 AM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi serrano,

yeah that's what i meant by:

 "I can stop it with making it deambiguous so that's not the real issue"



Reply With Quote
  #4 (permalink)  
Old June 24th, 2008, 11:35 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Hmmmm... OK, how about Plan B?

Open an totally new database and import everything from your quirky one into this one. Then recompile the VBA code in the new one and try it again. It could be a form of corruption in your original that is triggering the shutdown.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hoping it is Ok to ask Biztalk Q here? jihadbuster XSLT 1 March 19th, 2008 05:32 PM
Bug or no to bug learning C using VS.Net to compil tesh All Other Wrox Books 0 February 14th, 2007 01:06 PM
hoping tony65 Struts 2 February 13th, 2006 05:32 AM
Bug happens guoqi BOOK: ASP.NET Website Programming Problem-Design-Solution 0 October 13th, 2003 01:35 PM
Posting bug kilika Forum and Wrox.com Feedback 8 July 28th, 2003 09:19 AM



All times are GMT -4. The time now is 11:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.