MS Access Form "Pop Up" Property

hi experts,

i have a form right now.
and i set the "pop up" property of the form to be "yes" because i only want the user see the interface at the beginning. after they choose the options on the interface.
i would like the "pop up" property changes to "no"

can anybody help me on this?

Thank you
Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
You cannot reset the Popup property during runtime, at least not when the form is being opened (or is already open in Normal view).

If you want to reset it, you could open the form in Design view in Hidden mode, make the change then Save your changes:

DoCmd.OpenForm "Form2", acDesign, , , , acHidden
Forms("Form2").PopUp = False
DoCmd.Close acForm, "Form2", acSaveYes

You could also set the window to "topmost" mode like this:

1) Add the following to the General Declarations section of a Standard Module:

Public Const SWP_NOMOVE = 2
Public Const SWP_NOSIZE = 1
Public Const Flags = SWP_NOMOVE Or SWP_NOSIZE
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2

Declare Function SetWindowPos _
        Lib "user32" (ByVal hwnd As Long, _
                      ByVal hWndInsertAfter As Long, _
                      ByVal x As Long, _
                      ByVal y As Long, _
                      ByVal cx As Long, _
                      ByVal cy As Long, _
                      ByVal wFlags As Long) As Long

2) Add the following function to a STandard Module:

Public Function SetTopMostWindow(hwnd As Long, _
                                 Topmost As Boolean) As Long

On Error GoTo Err_SetTopMostWindow

  If Topmost = True Then 'Make the window topmost
    SetTopMostWindow = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, Flags)
    SetTopMostWindow = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, Flags)
    SetTopMostWindow = False
  End If

  On Error Resume Next
  Exit Function

  Select Case Err
    Case Else
     MsgBox "An error occurred in this application." & vbCrLf & vbCrLf & Err & ":" & Error$, vbCritical, "Application Error"
  End Select
  Resume Exit_SetTopMostWindow
End Function

Now, call this in when the form is Opened:

SetTopMostWindow Me.hwnd, True

To allow it to be moved back, set the final argument to False:

SetTopMostWindow Me.hwnd, False

not sure I know what you need on this.
the popup property only tells access to keep this window "on top" at all times.
what are you trying to accomplish?
Are you talking about a splash screen or a screen where they can physically make selections on the pop up form?
All Courses

From novice to tech pro — start learning today.