Results 1 to 6 of 6
  1. #1
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    48

    Repositioning a pop up box

    I've designed a query which allows the user to key in a value like:


    Where x = [Enter ....].
    When the pop up box opens, it's automatically centered in the middle of the form.



    1. Can this pop up box be re-positioned on the form to be more appealing?
    2. If yes to #1, how is this done?


    Thank you!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,521
    Not sure what you mean by 'centered in the middle of the form' - a query popup input prompt is not on a form. No, cannot dictate position of the prompt.

    I never use dynamic parameterized queries. But if you must, then use a control (textbox, combobx) on a form for user input. Then the query can reference the control instead of triggering a popup input prompt.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    48
    To clarify, I am using a combobox which has multiple selections. Upon that selection, the user is prompted to enter what is needed to execute the query which is where the popup prompt comes in. The way you have explained it, it does not appear to be possible.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,521
    My comments still apply. I NEVER use dynamic parameterized queries and I especially would NEVER set up a query with popup input prompt. So where does this popup come from - is it a prompt within the query or is it a VBA MsgBox or InputBox?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    48
    I'm still rather new to Access, but it's guess it would be referred to as an Inputbox. My goal is to provide the end user flexibility when choosing from the list box. The end query is then export to EXCEL with Pivots (users choice). I'm doing this all with VBA. Thank God for the internet and chat rooms like these, since I'm teaching myself VBA and have only been coding in it under 12 months coming from an old school programmer.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,521
    So why an InputBox and not another control on form for this second value? Be careful with MsgBox or InputBox for user input - difficult to validate input. An example:
    Code:
            Dim strTest As String
            strTest = "?"
            While strTest = "?"
                strTest = InputBox("Select Test Method (Enter 1 thru 5): " & vbCrLf & _
                    "1. T84" & vbCrLf & "2. T100" & vbCrLf & "3. T209" & vbCrLf & "4. T228" & vbCrLf & "5. T304", "Edit Calibrations", "?")
                If strTest Like "[1-5]" Then
                    If strTest = 4 Then
                        DoCmd.OpenForm "PycCal"
                    Else
                        DoCmd.OpenTable "PycCal" & Choose(strTest, "T84", "T100", "T209", "T228", "T304")
                    End If
                ElseIf strTest <> "" Then
                    MsgBox "Not a valid entry. Select 1 through 5 or Cancel."
                    strTest = "?"
                End If
            Wend
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Repositioning pictures in the report
    By SimonJ in forum Reports
    Replies: 0
    Last Post: 09-28-2006, 03:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums