How do I open a form without showing it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chingchanglang
    New Member
    • Jun 2006
    • 6

    How do I open a form without showing it?

    HElp! I need to open a form without actually opening it. I'm thinking more of "Loading" it so I can use its recordset. But I do NOT want to see it. i have no clue....
    Thanks!
  • chingchanglang
    New Member
    • Jun 2006
    • 6

    #2
    Got it...this seems to work for anybody that needs it:

    If Not SysCmd(acSysCmd GetObjectState, acForm, "Form Name") Then
    DoCmd.OpenForm ("Form Name")
    End If

    Comment

    • chingchanglang
      New Member
      • Jun 2006
      • 6

      #3
      What is wrong with this line of code? Now I'm getting a syntax error? I'm trying to pass in 2 arguments when I open the form. Anyone?

      If Not SysCmd(acSysCmd GetObjectState, acForm, "Edit Topic Information") Then

      DoCmd.OpenForm "Edit Topic Information", acNormal, , ("[Topic_Number] = " & Me.Topic_Number .Value & " AND [Topic_Descripti on] = " & Me.Topic_Descri ption.Value)

      End If

      Comment

      • wlc04
        New Member
        • May 2006
        • 70

        #4
        Do you have another form that you are calling it from?

        docmd.openform "Edit Topic Information"
        mainform.setfoc us
        Forms![Edit Topic Information].Form.Visible = False

        Another option is make the form you don't want to see a subform of your main form and just set it's visible property to false.

        Comment

        • chingchanglang
          New Member
          • Jun 2006
          • 6

          #5
          Thanks Wendy, but I got it. Turns out I didn't need to pass both variables, just one. So the first post worked.

          Comment

          Working...