The following article describes how you can use a hyperlink parameter in one frame of a frames page to populate the criteria in a database results region that takes user-defined criteria in a second criteria field.
Please follow these steps in the order presented.
The right.asp page will contain two database results regions. To create the first database results region, follow these steps:
Click to select the page in the right frame.
On the Insert menu, point to Database, and then click Results.
In step 1 of the Database Results Wizard, click to select Use an existing database connection. Click to select Sample in the list, and then click Next.
Click to select Customers from the Record source list, and then click Next.
Click More Options.
Click Criteria, and then click Add. Click to select CustomerID from the Field Name list, and then click OK.
Click OK again, and then click Next.
Click to select List - one field per item from the Choose formatting options for the records returned by the query list.
In the List Options list, click Table. Click Next.
Click to clear the Add search form check box, and then click Finish.
Save each page.
To create the second database results region, follow these steps:
Click to select the page in the right frame.
On the Insert menu, point to Database, and then click Results.
Click to select the Using an existing database connection option, and then click Sample from the list. Click Next.
Click to select Customers from the Record source list. Click Next.
Click Edit List. CTRL+Click every item in the Displayed fields list, except ContactName and ContactTitle, and then click Remove. Click OK.
Click More Options.
Click Criteria. Click Add. Click to select CustomerID from the Field Name list. Click OK.
Click Add. Click to select ContactName from the Field Name list. Click to select Begins With from the Comparison list. Click OK twice.
Click Defaults. Click to select the first item in the Name column, and then click Edit. Set the value to 0 (zero), and then click OK. Repeat this step for each item in the list.
Click OK twice, and then click Next.
Click to select List - one field per item to select the formatting options.
Click to select Table in the List Options list. Click Next.
Verify that the Add Search Form check box is selected. Click Finish.
To view its properties, double-click the CustomerID text box.
Copy the text in the Initial Value box. (It should be similar to the following: <%=Request("CustomerID")%>).
Click OK.
Right-click anywhere within the form, and then click Form Properties. Click Advanced, and then click Add.
In the Name field, type CustomerID.
In the Value field, press CTRL+V to paste the contents that you copied in step 15.
Click OK three times.
Select the line that contains CustomerID and the text box, and then press DELETE to delete these items.