Results 1 to 10 of 10
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Me.MyCombo.Dropdown not responding

    I have a code segment that runs when a form opens but the "DropDown" statement is ineffective. The RowSource looks good and with a default value set the combo appears with the default as expected but again the dropdown isn't working. What might be the cause of that?
    Code:
    Private Sub DonInit()
    
    Me.AmtBox = Null
    Me.AmtBox.Enabled = False       'Require designation of a fund
    
    Me.cboFunds.SetFocus
    Me.cboFunds.Dropdown
    
    End Sub


  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What event is it called from? Perhaps it's too soon.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Good point, it was in the OnOpen event so I moved it to the OnActivate but still doesn't dropdown. Doesn't work from the OnCurrent either

    Doesn't even work if I execute a dropdown when the control gets the focus.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I've used the got focus event before, never needed it when the form opens. Can you attach a sample db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Is it the only combo on the form? If so and the combo drops and retracts immediately (you may not be noticing it) then this is an old known issue - especially on form open event.
    One work around is to call the form timer event from a combo event such as enter or gotfocus, set timer interval = 1, drop down the activecontrol, set timer to 0. Never tried it, but I think that's the general idea.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    then this is an old known issue - especially on form open event
    I didn't set a timer, rather, I added a MsgBox statement after the dropdown that would cause execution to pause. The dropdown in fact occurred as you had suspected. Is a permanent timer the solution to this caper?

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Depends on your definition of permanent timer. My definition says no because the interval is set to zero after it runs, thus it may never run again - depending on what event called it. However, it will run again when the event you use to trigger it occurs again.

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    The use of the timer is the definitive answer...which I'm guessing is what the OP meant by 'permanent.' As soon as the Messagebox is cleared, in his 'workaround,' the dropdown will again retract...not allowing anything to be done to it before doing so.

    The code for this is super easy:
    Code:
    Private Sub Form_Open(Cancel As Integer)
      Me.TimerInterval = 1
    End Sub
    
    Private Sub Form_Timer()
      Me.TimerInterval = 0
      Me.ComboName.SetFocus
      ActiveControl.Dropdown
    End Sub

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  9. #9
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    I'm guessing is what the OP meant by 'permanent.'
    Yes

    And yes, the timer does the trick. Also, if one makes the form a "Popup" the dropdown functions perfectly without the timer.

  10. #10
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Thanks for the popoup tip

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

Similar Threads

  1. Replies: 9
    Last Post: 10-23-2017, 06:32 PM
  2. Window Not Responding
    By GbJubes in forum Forms
    Replies: 2
    Last Post: 12-21-2015, 07:36 AM
  3. Replies: 1
    Last Post: 07-09-2014, 03:36 PM
  4. Database Not Responding
    By Subwind in forum Programming
    Replies: 8
    Last Post: 06-10-2014, 07:54 AM
  5. Access Not Responding
    By bigspace55 in forum Queries
    Replies: 1
    Last Post: 02-28-2013, 01:02 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