Results 1 to 5 of 5

Thread: Doesn

  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Doesn

    Right this is the problem. From my data entry form "frmSkipQuote", I pop up a form "frmSeeTown" with a command button, the user makes a selection on the form and the info is passed back to the still open form "frmSkipQuote". The info required is in a Combo box

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Doesn

    Hi Rupert,

    Just a longshot here - maybe you could move your CloseForm line up a few lines - before the Dropdown command. It's possible that the dropdown is failing because the other form still has focus (assuming I read your code properly...)

    Also, if all else fails, place a breakpoint in the code and step through it one step at a time to see what's happening as each line executes. That often helps me find and fix problems.

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Doesn

    What control has the focus in frmSkipQuote? You can only dropdown a combo box if it has the focus.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Doesn

    I don't understand why you're trying to force the dropdown on the combobox in the first place. You've already set the value, so what's the purpose?
    Charlotte

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Doesn

    Thanks for that Mark, Spot on!

    I ran it with a breakpoint in the code, stepped through using F8 and what do you know, the combo was dropping down OK, but when the code got to the line DoCmd.Close acForm, "frmSeeTown", acSaveNo
    The focus reverted back to that form and the drop down went up again! Could only see it by stepping through. I was convinced it was a bug! I moved the lines around like this as suggested:

    Form_frmSkipQuote.cboSelectPrice.SetFocus
    Form_frmSkipQuote.cboSelectPrice.Requery

    DoCmd.Close acForm, "frmSeeTown", acSaveNo

    Form_frmSkipQuote.cboSelectPrice.Dropdown

    And it works! Why am I surprised? It just don

Posting Permissions

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