M
magmike
I have multiple buttons on a form. I would like to replace all the
buttons with a DropDown/ComboBox.
Each button uses the Application.FollowHyperlink function to visit a
particular webpage for research using the pages hyperlink structure
mixed with field data. For example, one button is for google maps.
Although this is not the exact link, the OnClick event looks like
this:
Application.FollowHyperlink "http://maps.google.com?address=" &
[address] & "&zip=" & [zip]
Another button uses a newspaper's search function to search for news
stories about the company in the record, and another for the contact's
name.
Of course, every time a new source is discovered, a new button must be
created (taking up form space). To streamline this, I am creating a
table where I can at any time add another source by adding a record,
giving it a name (i.e. New York Times) for the combo box, and a link
(i.e. "newpaperweb.com?search=" & [company]) for the event command.
When the user would use the pull down and make a selection, the
AfterUpdate event would use "Application.FollowHyperlink
[cmbSourceLink]" to direct to the source. This is the easy part.
What I am unsure about, however, is how to add an "All" selection to
the combo box. I currently have a button for this purpose, which has a
separate line in the code for each page. With IE's new tabbed
browsing, it conveniently opens one browser window with multiple tabs,
making researching a company or contact very efficient for the user.
Currently, when I do add a source, not only do we have to add a button
for it, we have to add the code to the SearchAll button as well.
Can anyone help me add an "All" selection to this combo box that would
use the Application.FollowHyperlink function with every record in this
table I am going to create and automatically use any new record that
are added later?
Thanks in advance!
magmike
buttons with a DropDown/ComboBox.
Each button uses the Application.FollowHyperlink function to visit a
particular webpage for research using the pages hyperlink structure
mixed with field data. For example, one button is for google maps.
Although this is not the exact link, the OnClick event looks like
this:
Application.FollowHyperlink "http://maps.google.com?address=" &
[address] & "&zip=" & [zip]
Another button uses a newspaper's search function to search for news
stories about the company in the record, and another for the contact's
name.
Of course, every time a new source is discovered, a new button must be
created (taking up form space). To streamline this, I am creating a
table where I can at any time add another source by adding a record,
giving it a name (i.e. New York Times) for the combo box, and a link
(i.e. "newpaperweb.com?search=" & [company]) for the event command.
When the user would use the pull down and make a selection, the
AfterUpdate event would use "Application.FollowHyperlink
[cmbSourceLink]" to direct to the source. This is the easy part.
What I am unsure about, however, is how to add an "All" selection to
the combo box. I currently have a button for this purpose, which has a
separate line in the code for each page. With IE's new tabbed
browsing, it conveniently opens one browser window with multiple tabs,
making researching a company or contact very efficient for the user.
Currently, when I do add a source, not only do we have to add a button
for it, we have to add the code to the SearchAll button as well.
Can anyone help me add an "All" selection to this combo box that would
use the Application.FollowHyperlink function with every record in this
table I am going to create and automatically use any new record that
are added later?
Thanks in advance!
magmike