Results 1 to 6 of 6

Thread: docmd.openform

  1. #1
    Join Date
    Apr 2004
    Posts
    100

    Unanswered: docmd.openform

    Hi,

    how can I use the docmd.openform command to open a form as a popup?

    The situation is the following. I want a form to open as popup only if a certain criteria is give. So how can I set the popup property?
    Thanks in advance!

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    There is a property under the OTHER Tab called Popup. Set it to yes or True

  3. #3
    Join Date
    Apr 2004
    Posts
    100
    hmm. i need to do the changes programmatically. what you mean is set the property in the design view.?
    thats not possible in my case, since i want the form to open as popup only if a certain criteria is meet.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Arrow

    In the form Open event put your check

    If your Criteria Then
    Me.PopUp=True
    else
    Me.PopUp=False
    End If

  5. #5
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    popup if

    Haven't got time to think this one through fully but:

    After the Docmd.openForm you have a string, normally the name of a form to open.

    This can be set with a number of arguments: acNormal etc.

    I would suggest a simple if then statement followed by the docmd.

    E.g.

    If myConditions = true then
    docmd. openform "myForm", acNormal, , , acFormAdd, acDialog, Me.Name
    else
    'Do nothing or open the form in a different way
    end if

    The acDialog action make sthe form behave a bit like like a popup.


  6. #6
    Join Date
    Apr 2004
    Posts
    100
    acdialog is what I have been looking for. Thanks a lot !

Posting Permissions

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