Sorry Yanick, I don't think that will work. (At least it doesn't in A2K, on
my machine). For one thing, you need to SetFocus to a control before you can
make it drop; for another, as soon as you SetFocus to another control, the
previous one rolls up again.
To nshippers, as far as I've been able to determine, what you want isn't
possible. I wish it was, I use the drop-on-entry functionality a lot, it
just makes sense to me to have a combobox drop open automatically in many
situations, instead of waiting for the user to do it manually. I wish there
was a DropOnEntry property for comboboxes that I could check yes or no,
instead of always having to code it. But there doesn't seem to be any other
way than by writing event code for each box. You could write a routine that
contained the code Me.ActiveControl.DropDown, but you would still have to
call that routine from each combobox's event code, which would actually be
more work than simply putting the DropDown command directly in the event
routine.
And there are some issues with the ActiveControl method. I'm not sure
exactly what the problem is, you could probably scan the archives to see
what people have to say about it. I believe the major issue is that, in
complicated routines, the active control may suddenly become something other
than what you thought. I only use it in things like the OnEntry or GotFocus
event routines, where I know for certain what the active control is, so I've
never had any problems with it. You could code your drop command as
ActiveControl.DropDown, then simply paste that line into the GotFocus or
OnEntry event routine of every combobox that you want to act this way. It
would at least save you having to type each combobox's name. I do that a lot
and it's always worked for me.
Pete