146f0 module code to close a form does not work
Sign Up |  Live StatsLive Stats    Articles 37,332| Comments 177,275| Members 19,415, Newest GP Kaur| Online 712
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags
Sikh Philosophy Network » Sikh Philosophy Network » Current News » Information Technology » module code to close a form does not work

module code to close a form does not work

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Close button on a form will not close form - error 2585 - action cannot be carried out while processing a form Angus Comber Information Technology 2 28-Jul-2006 08:37 AM
Can't delete form module Francophone Information Technology 3 28-Jul-2006 08:36 AM
How to enumerate functions/subroutines in Module or Form Domac Information Technology 0 28-Jul-2006 08:22 AM
Close one form and open another millie.patel@gmail.com Information Technology 5 28-Jul-2006 08:17 AM
On Close Code for character length Decembersonata Information Technology 4 05-Nov-2005 12:48 PM


Tags
module, code, close, form, work
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:34 AM
Angus Comber's Avatar Angus Comber
Guest
 
Posts: n/a
   
   
module code to close a form does not work

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Hello

I have a form called NewPolicy. On this form is a button which calls some
VBA code. At the end of the code is the line:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/13129-module-code-close-form-does-not.html

DoCmd.Close acForm, [Forms]![NewPolicy], acSaveNo

But this line does not close the form! What am I doing wrong?

Angus



*







Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:34 AM
Douglas J. Steele's Avatar Douglas J. Steele
Guest
 
Posts: n/a
   
   
Re: module code to close a form does not work

The Close method is looking for the name of the object to close, not a
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13129
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13129
reference to it.

Try:

DoCmd.Close acForm, "NewPolicy", acSaveNo


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Angus Comber" wrote in message
news:eHqaLGgpGHA.2400@TK2MSFTNGP03.phx.gbl...
> Hello
>
> I have a form called NewPolicy. On this form is a button which calls some
> VBA code. At the end of the code is the line:
>
> DoCmd.Close acForm, [Forms]![NewPolicy], acSaveNo
>
> But this line does not close the form! What am I doing wrong?
>
> Angus
>
>



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:34 AM
John Vinson's Avatar John Vinson
Guest
 
Posts: n/a
   
   
Re: module code to close a form does not work

  Donate Today!  
On Wed, 12 Jul 2006 23:21:10 +0100, "Angus Comber"
wrote:

>Hello
>
>I have a form called NewPolicy. On this form is a button which calls some
>VBA code. At the end of the code is the line:
>
>DoCmd.Close acForm, [Forms]![NewPolicy], acSaveNo
>
>But this line does not close the form! What am I doing wrong?
>
>Angus
>


You're not passing the *name of the form as a text string* in the
second argument of the Close event - you're passing the Form as an
object.

Use either

DoCmd.Close acForm, "NewPolicy", acSaveNo

or (more flexibly)
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13129
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13129

DoCmd.Close acForm, Me.Name, acSaveNo


John W. Vinson[MVP]
Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Occultism - Rejection in...
Today 22:22 PM
60 Replies, 2,594 Views
Woolwich Killing: The...
Today 22:09 PM
1 Replies, 11 Views
How does Sikhi help you...
Today 21:36 PM
30 Replies, 953 Views
Kirtan
Today 21:24 PM
0 Replies, 20 Views
Panjabi
Today 21:22 PM
15 Replies, 294 Views
Keeping Amrit Vela
Today 16:49 PM
12 Replies, 924 Views
Do you believe in...
Today 15:08 PM
196 Replies, 4,096 Views
Black Sikhs?
Today 06:33 AM
20 Replies, 5,845 Views
Man Driving Without...
Today 05:06 AM
5 Replies, 143 Views
Request for assistance...
Today 04:24 AM
8 Replies, 92 Views
Losing My Religion: Why...
Today 03:03 AM
13 Replies, 350 Views
Health Exercise And...
Today 02:10 AM
1 Replies, 94 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 02:10 AM
176 Replies, 4,517 Views
How Religions Change...
Today 02:07 AM
1 Replies, 108 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 01:52 AM
313 Replies, 7,610 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 23:25 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.52755 seconds with 32 queries
0