Results 1 to 2 of 2
  1. #1
    xopherira is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Indiana
    Posts
    53

    resetting combo box

    How do you reset combo box to first item in list after a selection has been made and a process ran?



    Code:
    Private Sub mdr_bom_ComboBox_AfterUpdate()
        DoCmd.SetWarnings (WarningsOff)
        
        If mdr_bom_ComboBox.Value = "1" Then
        DoCmd.RunMacro "3BSM_BOM_Load_Template", , ""
        ElseIf mdr_bom_ComboBox.Value = "2" Then
        DoCmd.RunMacro "LiftFan_BOM_Load_Template", , ""
        ElseIf mdr_bom_ComboBox.Value = "3" Then
        DoCmd.RunMacro "Roll_Post_BOM_Load_Template", , ""
        ElseIf mdr_bom_ComboBox.Value = "4" Then
        DoCmd.RunMacro "VAVBN_BOM_Load_Template", , ""
        End If
        
    End Sub

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    cboBox = "MyFirst Item"
    or
    cboBox = cboBox.itemdata(1)
    or
    cboBox = 7 (IF YOUR COMBO BOX IS BOUND TO A NUMERIC INDEX NOT SHOWN and 7 is the 1st item)

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

Similar Threads

  1. Auto number resetting
    By malix.creatives in forum Sample Databases
    Replies: 0
    Last Post: 02-17-2015, 07:50 AM
  2. Using DSUM resetting upon next ID in dataset
    By ellisjo3 in forum Queries
    Replies: 18
    Last Post: 01-13-2014, 09:24 AM
  3. Code For Resetting to Default Value
    By batowl in forum Forms
    Replies: 4
    Last Post: 03-14-2012, 02:54 PM
  4. Resetting Option Group Values
    By oleBucky in forum Forms
    Replies: 4
    Last Post: 03-31-2011, 05:19 PM
  5. Resetting autonumber when importing
    By bullwinkle55423 in forum Access
    Replies: 3
    Last Post: 06-30-2009, 11:56 AM

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