Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 23rd, 2008, 09:07 AM
Authorized User
 
Join Date: May 2007
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.

 
Old June 23rd, 2008, 03:35 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old June 24th, 2008, 11:18 AM
Authorized User
 
Join Date: May 2007
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"



 
Old June 24th, 2008, 11:35 AM
Friend of Wrox
 
Join Date: Jun 2003
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.