Opening and Closing Popup Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tmdrake
    New Member
    • Mar 2013
    • 43

    #1

    Opening and Closing Popup Form

    [Z{Moderator's Comment: This thread was split from the orignial:
    > Form Creation Help}]


    Got it to work, but now I have a couple of questions regarding the form. I turn the form into a popup, which works great. However, how to I get the initials and the Yes/No choice to save in the table. The form's control source is a table named "EventT" with colums to record the choice and the initals. But when I run the form the choices and initals don't record in the table.

    Thanks
    Toni
    Last edited by zmbd; Mar 19 '13, 10:29 PM. Reason: [Last edited by tmdrake; 3 Hours Ago at 02:13 PM. Reason: Spell Checked ][z{split thread}]
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    Ah, so then this is a bound form. You just need to edit the control source of your Initials textbox to the proper field. If you click in the control source property, you will get a drop down list of the possible fields. In your buttons' OnClick events, you can reference the field to set it to the value you need (I know this works if the recordsource is a query, but I'm not sure if it works on a table).

    Comment

    • tmdrake
      New Member
      • Mar 2013
      • 43

      #3
      Thanks Seth, that worked. Now how do I get the popup form to close on selecting Okay. Below is the code I've come up with so far, but I'm not sure where to go from here.

      I need for it to open a form, then close the popup form;

      Code:
      Private Sub Yes_Click()
            DoCmd.OpenForm.:GeneralTabPullTest:
      Thank you very much for helping me.

      Comment

      • tmdrake
        New Member
        • Mar 2013
        • 43

        #4
        Opening and Closing Popup Form would be a good title.

        Comment

        • Seth Schrock
          Recognized Expert Specialist
          • Dec 2010
          • 2965

          #5
          Assuming the name of your form is frmPopup,
          Code:
          DoCmd.Close acForm, "frmPopup"
          You can put this in the OnClick event of any of your buttons.

          Comment

          • tmdrake
            New Member
            • Mar 2013
            • 43

            #6
            Thanks Seth, this worked perfectly.

            Comment

            Working...