Giusto @Alex
ma se non dovesse funzionare in quanto la combobox non è ancora caricata, può accadere nei casi in cui gli Items vengono caricati da un recordset esterno e/o filtrati, etc... allora si può pensare di utilizzare l'evento Current o Activate, condizionando l'operazione che avvenga solo una volta, Dipende dai vari scenari.
Esempio:
Private Sub Form_Activate()
Static boolFirst As Boolean
If Not boolFirst Then
With Me.MyComboBox
.Requery ' if necessary to execute requery
If .ListCount > 0 Then .Value = .ItemData(.ListCount - 1)
End With
boolFirst = True
End If
End Sub
Ma se la Form è di tipo Popup non va bene.... e allora è bene utilizzare l'evento Current
Esempio:
Private Sub Form_Current()
Static boolFirst As Boolean
If Not boolFirst Then
With Me.MyComboBox
.Requery ' if necessary to execute requery
If .ListCount > 0 Then .Value = .ItemData(.ListCount - 1)
End With
boolFirst = True
End If
End Sub