Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    global code (Access 2000)

    In the private codes of the form i use the command DoCmd.Close acForm, Me.Name which is very convenient.But i need to use now public codes and i
    cannot use it anymore, neither can i sue only DoCmd.Close.I have to refer to the form.Is there any trick here too for the closing of any form ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: global code (Access 2000)

    If you use a public sub or function that you want to call from the form that you want to close, you can use

    DoCmd.Close acForm, CodeContextObject.Name

    CodeContextObject refers to the object that is executing the code, i.e. the form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •