Dynamic WebSearch

Hi,
I have a search bar inside toolbar. How can I change my search based on the loaded page?
For example, when I’m on the Products page, my research will be carried out in the Products table else if I’m on the vendor list my research will be carried out in the Sellers table. In practice, I should run two different queries based on the loaded page.
It’s possible?
Thank you,
Andrea.

Hi Andrea,

You’re description is what your code should do :slight_smile: :

  • Get the string of the Searchbar.
  • Determine what page is active.
  • Build a query based on the database table based on the Page.
  • Run the Query
  • Update your Listbox and/or other controls.

To determine the page, this should work:

dim thePageName as string thePageName = theToolBar.Parent.Name

Hi Hal,
your bullet point are correct.
I will try your code.
Thank you so much.
Andrea :slight_smile: