Buongiorno,
vorrei ottenere questo effetto per essere pił veloce.
su una casella combinata, alla pressione del tasto invio con casella vuota vorrei avere la discesa dell'elenco.
Grazie per l'aiuto.
Buongiorno,
vorrei ottenere questo effetto per essere pił veloce.
su una casella combinata, alla pressione del tasto invio con casella vuota vorrei avere la discesa dell'elenco.
Grazie per l'aiuto.
Code:Private Sub YourCombo_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then ' Ignore this key so it's not moving focus to the next control KeyCode = 0 YourCombo.Dropdown End If End Sub
Va bene, ma non riesco pił ad andare al controllo successivo.
Ho provato anche ad eliminare la linea "KeyCode=0" ma non funziona.
Sorry, I don't speak italian, I used google translate to understand what you're asking for As far as I understand now you have problem with not moving to next control after pressing ENTER when there's value selected in combobox.
Default behaviour of ENTER key is to move to next control so you need to override it if you want to use ENTER to dropdown your combobox. Now you have 3 options:
1. Change your code a bit to:
2. Use TAB to move to next control on formCode:If KeyCode = vbKeyReturn And (Me.YourCombo.Value = "" Or IsNull(Me.YourCombo.Value)) Then
3. Use LEFT ALT + ARROW DOWN to expand combobox (instead of ENTER)