This example shows the use of the SearchAliasFields property. Press the 'Search' button and chose a supplier to apply a filter to the recordset.
 First   Prev   Next   Last   Search 
  ProductName CompanyName
1 Aniseed Syrup Exotic Liquids
2 Chef Anton's Cajun Seasonings New Orleans Cajun Delights
3 Chef Anton's Gumbo Mix New Orleans Cajun Delights
4 Grandma's Boysenberry Spread Grandma Kelly's Homestead
5 Uncle Bob's Organic Dried Pears Grandma Kelly's Homestead
ProductID 3
ProductName Aniseed Syrup
SupplierID 1
CategoryID 2
QuantityPerUnit 12 - 550 ml bottles
UnitPrice 10
UnitsInStock 13
UnitsOnOrder 70
ReorderLevel 25
Discontinued No
CompanyName Exotic Liquids
ContactName Charlotte Cooper
ContactTitle Purchasing Manager
Address 49 Gilbert St.
City London
Region  
PostalCode EC1 4SD
Country UK
Phone (171) 555-2222
Fax  
HomePage  
This is the code implementing the example:
<!--#include file="VBSdb/inc.asp"-->
<%
   VbsDbNew objVbsDb
   objVbsDb( "MdbPath" ) = "data/nwind.mdb"
   objVbsDb( "GlobalOleDbProvider" ) = "ODBC"
   objVbsDb( "Sql" ) = "select * from Products inner join Suppliers on Products.SupplierID=Suppliers.SupplierID"
   objVbsDb( "GridFields" ) = "ProductName,CompanyName"
   objVbsDb( "ViewNavigationPosition" ) = "top"
   objVbsDb( "SearchFields" ) = "ProductName;SupplierID"
   objVbsDb( "SearchAliasFields" ) = "SupplierID|Suppliers.SupplierID"
   objVbsDb( "InputSelectFields" ) = "SupplierId|select SupplierId,CompanyName from Suppliers"
   VbsDb objVbsDb
%>
This demonstrative program connects to Nwind.mdb, the well known Microsoft Access sample database: the names of companies, products, people, characters, and/or data mentioned herein are fictious and are in no way intended to represent any real individual, company, product, or event. To download a copy of Nwind.mdb, please visit Microsoft's site.