The DropDown method:
Me.MyComboBox.DropDown
> Within code, is there a way to open a combo box list to show entries up to
> the limit set similar to how Access handles NotInListEvent? This event, if
> left to default where Limit to List is set to 'Yes', will put out standard
> error message but then, open the current list. What code opens this list up?
>
> Thanks.
Andy - 05 Dec 2005 23:29 GMT
Thanks Klatuu but I did try the Dropdown method but nothing happened - I
could still only see Combo text field (no drop down list) - The After Update
code below :-
If Me.Combo8.ListIndex = -1 Then
MsgBox "Name supplied is not in list"
Me.Combo8.ForeColor = vbRed
Me.Combo8.Dropdown
GoTo Exit_Combo8_AfterUpdate
Else
Me.Combo8.ForeColor = vbBlack
End If
...
> The DropDown method:
>
[quoted text clipped - 6 lines]
> >
> > Thanks.
Klatuu - 05 Dec 2005 23:33 GMT
Then I don't understand the question. What are you trying to do?
> Thanks Klatuu but I did try the Dropdown method but nothing happened - I
> could still only see Combo text field (no drop down list) - The After Update
[quoted text clipped - 21 lines]
> > >
> > > Thanks.
Marshall Barton - 06 Dec 2005 05:18 GMT
>Thanks Klatuu but I did try the Dropdown method but nothing happened - I
>could still only see Combo text field (no drop down list) - The After Update
[quoted text clipped - 8 lines]
> Me.Combo8.ForeColor = vbBlack
> End If
That's because the focus is moving to another control and
the DropDown only means something while the combo box has
the focus.
Move your code to the BeforeUpdate event and add:
Cancel = True
after the DropDown line.

Signature
Marsh
MVP [MS Access]