Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OnClose event in reports (Access 2000)

    In the OnClose event of my report i have a command to open the form Form1.:
    DoCmd.OpenForm "Form1"
    However i have a special case. if i have opened the form Form3, i want on closing the report to open the form 3 and not Form1.I know there is a function called " If Is Opened" but i cannot find it. What is the best way to open the form Form3 in case i have opened the report from the form Form3 ?

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

    Re: OnClose event in reports (Access 2000)

    You can use the IsLoaded property like this:

    If CurrentProject.AllForms("Form3").IsLoaded Then
    Forms!Form3.SetFocus
    Else
    DoCmd.OpenForm "Form1"
    End If

  3. #3
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OnClose event in reports (Access 2000)

    Thank you so much ! It works fine !

Posting Permissions

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