Consulting

Results 1 to 3 of 3

Thread: Access 2013 VBA for drop-down list box on mouseover.

  1. #1

    Question Access 2013 VBA for drop-down list box on mouseover.

    My forms: NewClient, NewMaterial
    I want to create a drop-down list box so that when the user mouseover the combobox, the list for forms is dropped and when the user click on the NewClient, the form is opened. Just as a website.
    Any help ??

  2. #2
    VBAX Expert
    Joined
    Oct 2012
    Posts
    726
    Location
    Private Sub Combo0_Click()
        Select Case True
        Case Combo0.Value = "---Select---"
        Case Else
            DoCmd.OpenForm Combo0.Value, acNormal
            Combo0.Value = "---Select---"
        End Select
    End Sub
    
    Private Sub Combo0_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Combo0.Dropdown
    End Sub
    
    Private Sub Combo0_NotInList(NewData As String, Response As Integer)
        Response = 0
    End Sub
    
    Private Sub Form_Load()
        Combo0.RowSource = ""
        Combo0.RowSourceType = "value list"
        Combo0.LimitToList = True
        
        Combo0.AddItem "---Select---"
        Combo0.AddItem "NewClient"
        Combo0.AddItem "NewMaterial"
        
        Combo0.Value = "---Select---"
    End Sub

  3. #3
    Thx

Tags for this Thread

Posting Permissions

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