CommandBar

  • Thread starter Thread starter Frank Dulk
  • Start date Start date
F

Frank Dulk

I know that using the object CommandBar through code is possible to add
combos to the menu bar.

However, would like to know if it is possible to do that in a visual way,
through some assistant. Does anybody know?
 
I don't think so.

You have to remember that the combo box in that bar is like a VB combo, and
it can't be bound to sql, you HAVE to use code to fill it. You can't
have/show multiple columns like the ms-access one. There is no set of
"extra" events like "not in list". And just about every good feature of the
ms-access combo box is missing

(what you get is the popular "old" VB combo box..which really pales compared
to the ms-access one).

Since you have to use code to fill this box...then you might as well use
code to add it!! (it does not even have a default value list like ms-access
ones).

Of course, the reason why we get the lame vb combo here is that the menu
bars are common to all of ms-office, and thus VB people, Excel people etc.
do get a combo that works like "their" combo boxes...and in ms-access we get
a much better combo for forms..but do get the same combo in a menu bar that
VB, excel and all others get since the menu bars (system) is common to all
of office.
 
Albert said:
in ms-access we get
a much better combo for forms..but do get the same combo in a menu bar that
VB, excel and all others get since the menu bars (system) is common to all
of office.

Excuse my ignorance but is the MS Access combo an ActiveX control (if
not, what then is it?) If it is an ActiveX, can it be added via
<commandbar>.Controls.Add(msoControlActive­X)? If it is something
else, can it be added to button's face using win32 APIs?

Jamie.

--
 
Albert said:
in ms-access we get
a much better combo for forms..but do get the same combo in a menu bar that
VB, excel and all others get since the menu bars (system) is common to all
of office.

---> Excuse my ignorance but is the MS Access combo an ActiveX control (if
not, what then is it?)

It is a native control that is part of ms-access. It is certainly possible
(likely) that it does call the windows sets of api to make the combo box
work. So, perhaps there is some type of wrapper to the windows api going on
here. However, it is not a activeX control. For example, each control in VB
as a hwnd (handle), but ms-access controls do NOT have a handle, EXCEPT when
they have the focus. (if you look in the properties for a control in
ms-access, there is NO hwnd exposed, but there IS one for the whole form).

As mentioned, the combo box for ms-access runs circles around the lame vb
one (no not in list event, no before update event, no previous data, no
after update event (not sure on this one...I think you use the change
event..but ms-access has both!), no allowing of multiple columns, No auto
expand on text column, but storing of the key id (actually the vb combo can
do this..but is limited to two columns...not "many" like in ms-access). No
allowing for stuffing sql into the rowsouce without making a connection
string. And, I don't believe the VB combo supports use a function name for
the data source like ms-access does (you can bind the combo to a function in
ms-access, and use that as the data source for the combo).
 
Albert said:
It is a native control that is part of ms-access. It is certainly possible
(likely) that it does call the windows sets of api to make the combo box
work. So, perhaps there is some type of wrapper to the windows api going on
here. However, it is not a activeX control. For example, each control in VB
as a hwnd (handle), but ms-access controls do NOT have a handle, EXCEPT when
they have the focus. (if you look in the properties for a control in
ms-access, there is NO hwnd exposed, but there IS one for the whole form).

As mentioned, the combo box for ms-access runs circles around the lame vb
one (no not in list event, no before update event, no previous data, no
after update event (not sure on this one...I think you use the change
event..but ms-access has both!), no allowing of multiple columns, No auto
expand on text column, but storing of the key id (actually the vb combo can
do this..but is limited to two columns...not "many" like in ms-access). No
allowing for stuffing sql into the rowsouce without making a connection
string. And, I don't believe the VB combo supports use a function name for
the data source like ms-access does (you can bind the combo to a function in
ms-access, and use that as the data source for the combo).
It is a native control that is part of ms-access. It is certainly possible
(likely) that it does call the windows sets of api to make the combo box
work. So, perhaps there is some type of wrapper to the windows api going on
here. However, it is not a activeX control. For example, each control in VB
as a hwnd (handle), but ms-access controls do NOT have a handle, EXCEPT when
they have the focus. (if you look in the properties for a control in
ms-access, there is NO hwnd exposed, but there IS one for the whole form).

As mentioned, the combo box for ms-access runs circles around the lame vb
one (no not in list event, no before update event, no previous data, no
after update event (not sure on this one...I think you use the change
event..but ms-access has both!), no allowing of multiple columns, No auto
expand on text column, but storing of the key id (actually the vb combo can
do this..but is limited to two columns...not "many" like in ms-access). No
allowing for stuffing sql into the rowsouce without making a connection
string. And, I don't believe the VB combo supports use a function name for
the data source like ms-access does (you can bind the combo to a function in
ms-access, and use that as the data source for the combo).

Thanks for this Albert. The MS Access one may be more functionally rich
but it seems firmly limited to Forms <g>.

Jamie.

--
 
Back
Top