Change the CustomerList query to:
*** Run a static query - this time with the Company parameter SELECT HREF([ShowCustomer.wp?ID=] +TRANSFORM(pk),Company) as Company,; careof as Customer_Name ; from tt_cust ; WHERE UPPER(company) = UPPER(lcCompany) ; INTO CURSOR TQuery ; ORDER BY Company
This makes the list look a little nicer by displaying less information and more importantly adds hypelinks for each of the customer entries. Note that this essentially embeds a hyperlink into the query - the HREF() function outputs an <a href="url">text</a> tag as output. You can create any kind of formatted string that contains HTML. In this case it's a hyperlink.
Each hyperlink then should link to display each of the customers and their customer detail. In order to do this I use a SQL statement that embeds HTML HREF links directly into the query output. The key thing about the generated HREF is the ID= querystring value to which I assign the customer's ID, which in this case is the PK.

FUNCTION ShowCustomer lnPK = VAL( Request.QUeryString("ID") ) SELECT Company,careof as Name,Phone, Email, BillRate, Entered ; from TT_CUST ; WHERE PK = lnPK ; INTO CURSOR TQUery Response.HTMLHeader("Customer Info for: " + TQUery.Company ) loSc = CREATEOBJECT("wwShowCursor") loSC.cTableWidth = "450" loSC.ShowRecord() Response.Write( loSC.GetOutput() ) Response.Write('<hr>[<a href="customerlist.wp">Customer List</a>]') Response.HTMLFOOTER() ENDFUNC
The output from this wwShowCursor generated record display looks like this:

This output is very basic, but once again it gives you a quick way to display data or to even capture the HTML and stick it into an HTML editor for fix-up and potential reuse later with templates. More on this in a bit. Notice again that a SQL statement is used here to filter the display data - ShowRecord() uses the fields of the record in the current cursor to determine what gets displayed.
You could also use a LOCATE on the actual table (tt_cust) and then apply the cRecordFieldList property like this:
SELECT TT_CUST LOCATE FOR PK = lnPK loSc = CREATEOBJECT("wwShowCursor") loSC.cTableRecordFieldList = "Company,Careof,BillRate" loSC.ShowRecord() Response.Write( loSc.GetOutput() )
There are field list properties for each of the various display functions (ShowCursor, ShowRecord, EditRecord). But be aware that this property causes another query to be run to retrieve the data with a different field list, so there's additional overhead here. If you can format the cursor on your own you will always get better performance and usually better formatting capabilities.