Charlotte Foust
cfoust at infostatsystems.com
Wed May 19 12:42:25 CDT 2004
Try building a macro to close the switchboard form and see whether you can call it properly from the switchboard. Charlotte Foust -----Original Message----- From: Mitsules, Mark S. (Newport News) [mailto:Mark.Mitsules at ngc.com] Sent: Wednesday, May 19, 2004 9:15 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Close Switchboard Based on what has been suggested I have: Function fCloseSwbd() DoCmd.Close acForm, "Form_Switchboard", acSaveNo End Function The switchboard button uses the RunCode option to call fCloseSwbd. I set a breakpoint at the entry point of fCloseSwbd, but the code never reaches it. The error I am getting is "There was an error executing the command.". Mark -----Original Message----- From: Mitsules, Mark Sent: Wednesday, May 19, 2004 1:01 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Close Switchboard Maybe I wasn't clear enough:( Or else I am completely missing the point:((((( This is not a regular form. It is an Access generated switchboard. Using the Switchboard Manager, the options for a button are finite...Open Form, Open Report, etc. I'm assuming I need to use the RunCode option in some manner... Mark -----Original Message----- From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] Sent: Wednesday, May 19, 2004 12:51 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Close Switchboard Yes, on the OnClick event of your 'close' button, just put the code Charlotte posted. 'DoCmd.Close'. When you run it directly on a form, you don't have to tell it what to close. If you run it from a module, then you have to tell it what to close, because a module can't be 'closed'. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mitsules, Mark S. (Newport News) Sent: Wednesday, May 19, 2004 11:13 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Close Switchboard So you're saying use the RunCode option, create a function like fCloseSwbd() and place DoCmd.Close in there? Didn't work. Did I misinterpret? Mark -----Original Message----- From: Charlotte Foust [mailto:cfoust at infostatsystems.com] Sent: Wednesday, May 19, 2004 11:45 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Close Switchboard DoCmd.Close Charlotte Foust -----Original Message----- From: Mitsules, Mark S. (Newport News) [mailto:Mark.Mitsules at ngc.com] Sent: Wednesday, May 19, 2004 7:41 AM To: '[AccessD]' Subject: [AccessD] Close Switchboard I'm drawing a huge blank here. I want a switchboard button that simply closes the form...which will allow the code in Form_Close to run. What is the simplest way to do this? Mark -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com