Results 1 to 2 of 2
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    force action at combo box

    I have code that requiries, sets focus to, and then displays the drop-down for a combobox.


    All of this is because I simply do not want the cbo displayed all of the time...
    The sub that executes this code is triggered by a command button, and is intended to check to see if the user has any history "changing projects", and if so, the user can simply pick from the cbo which is self populating; if there is no history then code executes a file dialogue for them to pick from...

    The problem is... after the dropdown appears, the code continues to execute...

    What I would like it to do is stop executing code until the owner takes an action in the cbo. The cbo has its own code that will execute on its after-update event, and once that has happened, the remainder of the code in the sub that displayed the cbo should continue


    I think what I may have to do is put the cbo on an unlinked subform, and them make the form modal;
    I was hoping that there might be a more direct (ie: simpler) method

    Private Sub cmdChangeProject_Click()
    vCnt = DCount("[ProjectName]", "tblChangeProjectList")
    If vCnt > 0 Then
    Me.cboChangeProject.Requery
    Me.cboChangeProject.Visible = True
    Me.cboChangeProject.SetFocus
    Me.cboChangeProject.Dropdown
    Else
    ...

    any thougths are appreciated with thanks in advance
    Mark

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    What is the remainder of the code? It couldn't be in the AfterUpdate event? Otherwise, would have to put combobox on popup form, not a subform, and that presents issue of how to pass value back to the calling form.
    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. How to force an update
    By bginhb in forum Forms
    Replies: 14
    Last Post: 12-04-2015, 07:00 AM
  2. Force users to log off
    By Bruce in forum Security
    Replies: 8
    Last Post: 01-10-2013, 07:03 PM
  3. Replies: 5
    Last Post: 01-18-2012, 12:32 AM
  4. Force new page
    By kwooten in forum Reports
    Replies: 1
    Last Post: 07-28-2011, 04:42 PM
  5. Force numeric value
    By jgelpi16 in forum Programming
    Replies: 5
    Last Post: 01-24-2011, 12:37 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