This example shows the use of the InputSelectFields property. Press the 'Search' button and chose a supplier to apply a filter to the recordset.
 First   Prev   Next   Last   Search   Add   Update   Delete 
  ProductName CompanyName
1 Chai Exotic Liquids
2 Chang Exotic Liquids
3 Aniseed Syrup Exotic Liquids
4 Chef Anton's Cajun Seasoning New Orleans Cajun Delights
5 Chef Anton's Gumbo Mix New Orleans Cajun Delights
ProductID 1
ProductName Chai
Supplier 1
CategoryID 1
QuantityPerUnit 10 boxes x 20 bags
UnitPrice 18
UnitsInStock 39
UnitsOnOrder 0
ReorderLevel 10
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( "ViewNavigationButtons" ) = "first;prev;next;last;search;removeFilter;add;update,delete"
   objVbsDb( "ViewNavigationPosition" ) = "top"
   objVbsDb( "SearchFields" ) = "ProductName;SupplierID"
   objVbsDb( "SearchAliasFields" ) = "SupplierID|Suppliers.SupplierID"
   objVbsDb( "EditTableName" ) = "Products"
   objVbsDb( "EditKeyFields" ) = "ProductID"
   objVbsDb( "EditValidateRequiredFields" ) = "ProductName|ProductName is required!"
   objVbsDb( "InputSelectFields" ) = "SupplierId|select SupplierId,CompanyName from Suppliers"
   objVbsDb( "EditAddFieldDefaults" ) = "SupplierId|3"
   objVbsDb( "GlobalFieldHeaders" ) = "SupplierId|Supplier"
   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.