By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,396 Members | 1,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,396 IT Pros & Developers. It's quick & easy.

Acess 97 toolbar help wanted

P: n/a
I have created a database and have a form containing unbound drop down
lists that I use as the source for filters.

Does anyone know how I can put the drop down lists from my form into a
toolbar ?
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Goto View/Toolbars/Custom/New. I created a toolbar here called
"CBtest". Make sure you have a reference to Microsoft Office X in
Tools/References otherwise Access won't recognize Commandbar or
CommandbarControl. Then just copy and paste the routine below. This
will create a dropdown combobox. You can get more information in the
Access Help files under Commandbar.

Sub CmdBrStuff()
Dim CB As CommandBar, cbCtl As CommandBarControl
Set CB = CommandBars("CBtest")
Set cbCtl = CB.Controls.Add(Type:=msoControlDropdown)
cbCtl.Caption = "DropDown"
cbCtl.Style = msoComboLabel
cbCtl.Width = 200
cbCtl.AddItem "First", 1
cbCtl.AddItem "second", 2
cbCtl.AddItem "third", 3
End Sub


*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.