usky1
asked on
Search on select field
I have the following query which is working great, I added a select menu (cats_Info) to the previous page where the list="#editfields#" are selected. How can I add to my query below to show only the records that are associated with the select menu value I selected? The select menu is not required so if no slection is made I just run the query below as it is currently.
<cfquery name="GetProds" datasource="GH234" cachedwithin=#CreateTimeSp an(0,0,30, 0)#>
SELECT ProductMatrix.ProductID,Ca ts.Caption ,Cats.Cate goryID,
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProductOrd.Level
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
</cfquery>
<cfquery name="GetProds" datasource="GH234" cachedwithin=#CreateTimeSp
SELECT ProductMatrix.ProductID,Ca
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProductOrd.Level
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
</cfquery>
ASKER
What table  - (cats)
and column (cats_information)
does "cats_Info" relate to, and what is the default value if no selection is made? An empty string ""Â (yes) Â or something else?
Also, you're missing a join between "Cats" and the other two tables (if I use the AND in the sql statement what happens if there is not a selection made with the cats_info?)
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
AND Â Â Cats.SomeField = OneOfTheOtherTables.SomeFi eld
and column (cats_information)
does "cats_Info" relate to, and what is the default value if no selection is made? An empty string ""Â (yes) Â or something else?
Also, you're missing a join between "Cats" and the other two tables (if I use the AND in the sql statement what happens if there is not a selection made with the cats_info?)
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
AND Â Â Cats.SomeField = OneOfTheOtherTables.SomeFi
There's a difference between joining on related columns and filtering on a specific value. Â If you join on the related columns, you should ideally get the same results as before. Â
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
AND Â Â Cats.SomeField = OneOfTheOtherTables.SomeFi eld
Then if a selection is made for "cats_info", add another statement to filter the results. Â In other words, out of those results .. return only the records where Cats.Cats_information = '#form.cats_info#'
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
AND Â Â Cats.SomeField = OneOfTheOtherTables.SomeFi eld
<cfif len(trim(form.cats_info)) gt 0>
   AND  Cats.Cats_information = '#form.cats_info#'
</cfif>
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
AND Â Â Cats.SomeField = OneOfTheOtherTables.SomeFi
Then if a selection is made for "cats_info", add another statement to filter the results. Â In other words, out of those results .. return only the records where Cats.Cats_information = '#form.cats_info#'
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
AND Â Â Cats.SomeField = OneOfTheOtherTables.SomeFi
<cfif len(trim(form.cats_info)) gt 0>
   AND  Cats.Cats_information = '#form.cats_info#'
</cfif>
ASKER
I had to add a IsDefined to the query because I received the following error if I did not do a selection,
Element CATS_INFO is undefined in FORM
Was: <cfif len(trim(form.cats_info)) gt 0>
Changed to: <cfif IsDefined("form.cats_info" )AND form.cats_info GT 0>
I am also doing an output of form.cats_info to see if it is being working and it is.
The output from the query is still the same as the original and does not output only the selected value.
Element CATS_INFO is undefined in FORM
Was: <cfif len(trim(form.cats_info)) gt 0>
Changed to: <cfif IsDefined("form.cats_info"
I am also doing an output of form.cats_info to see if it is being working and it is.
The output from the query is still the same as the original and does not output only the selected value.
A "single" select list should always exist on the action page, unless it has no options at all or its using "multiple" and no selections where made.
Can you post the code for generating the form.cats_info select list and your new query code?
Can you post the code for generating the form.cats_info select list and your new query code?
ASKER
I have an emergency item that I need to take care of. It might be the morning before I can post.
Thanks,
Thanks,
Okay
ASKER
The query is partially working. I get the results on the first page but it does not show any additional pages. I have it set for 15 records per page and I know with the selection I did that there are multiple pages. Also it will not allow any updates now. I do not get any errors back but I select update it comes back with out any updated information. Is there a way for me to email you the two pages. There is sensitive information in the code that I will need to modify if I post it here. Â Thanks,
> There is sensitive information in the code that I will need to modify if I post it here
Yes, I know its a pain, but its probably best to xxx out confidential info and post the code here. That way everyone can benefit from the final answer.
Yes, I know its a pain, but its probably best to xxx out confidential info and post the code here. That way everyone can benefit from the final answer.
ASKER
This is the select list:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------
<CFIF Getcats.recordcount is not 0>
       <p><SELECT NAME="Category_ID" SIZE="6" class="textblacknormal">
             <CFOUTPUT QUERY="getcats">
              <CFIF Len("#Caption#") GT 20>
               <CFSET cTitle = "#Left("#Caption#", 20)#...">
                 <CFELSE>
               <CFSET cTitle = #Caption#>
               </CFIF>
                <OPTION VALUE="#CategoryID#">#cTit le#</CFOUT PUT>
             </SELECT>
              <CFELSE>
            <P>
            <FONT FACE=ARIAL color="#000080">No Categories Available</FONT></p>
           </CFIF>
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
This is the code from the results page: (it is a work in progress)
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -----
<cfset CurrentPage=GetFileFromPat h(GetTempl atePath()) >
<cfparam name="PageNum_GetProds" default="1">
<cfset MaxRows_GetProds=15>
<cfparam name="RetailPrice" default="">
<cfparam name="ENumber" default="">
<cfparam name="OBS" default="">
<cfparam name="editfields" default="">
<cfparam name="relevel" default="">
<cfparam name="warehousecode" default="">
<cfparam name="Information" default="">
<cfparam name="cats.Information" default="">
<cfparam name="Category_ID" default="">
<!--- Query change on 10/03/07 per EE recoomendation. New query below --->
<!--- <cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp an(0,0,30, 0)#>
SELECT ProMatx.ProductID,cats.Inf ormation,c ats.Catego ryID,
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      <cfif IsDefined("Category_ID">
      AND cats.CategoryID = Products.CategoryID
      </cfif>
</cfquery> --->
<cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp an(0,0,30, 0)#>
SELECT ProMatx.ProductID,cats.Inf ormation,c ats.Catego ryID,
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      AND      cats.CategoryID = Products.CategoryID
      <cfif IsDefined("form.Category_I D")AND form.Category_ID GT 0>
           AND cats.CategoryID = '#form.Category_ID#'
      </cfif>
</cfquery>
<cfif IsDefined("form.Category_I D")AND form.Category_ID GT 0>
rc====<cfoutput>#form.Cate gory_ID#</ cfoutput>
<cfelse>
rc====00000000000
</cfif>
<cfquery name="GetCatID" datasource="GH234b">
SELECT <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>cats.CategoryID, cats.Information
FROM cats, Products
WHERE Products.CategoryID = cats.CategoryID
ORDER BY Products.ProductID
</cfquery>
      <cfif NOT IsDefined("session.editfie lds")>
           <cfset session.editfields = "#editfields#">
           <cfelse>
      </cfif>
      <!--- <cfoutput>#Session.EditFie lds#</cfou tput> --->
<cfif IsDefined("FORM.MM_UpdateR ecord") AND FORM.MM_UpdateRecord EQ "form1">
<cfloop index="idx" from="#form.startCount#" to="#form.endCount#">
<cfquery datasource="GH234b">
Update Products
Set Custom6 =
           <cfif IsDefined("form.Custom6" & idx) AND form["Custom6" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.Custom6" & idx))#" cfsqltype="cf_clob">
           <cfelse>
           ''
           </cfif>
      <CFIF IsDefined("GetProds.SKU")>
           , SKU =
           <cfif IsDefined("form.SKU" & idx) AND form["SKU" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.SKU" & idx))#" cfsqltype="cf_clob">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.OBS")>
           , OBS =
           <cfif IsDefined("form.OBS" & idx) AND form["OBS"& idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.OBS" & idx))#" cfsqltype="cf_sql_decimal" >
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Retail Price")>
           , RetailPrice =
           <cfif IsDefined("form.RetailPric e" & idx) AND form["RetailPrice" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.RetailPr ice" & idx))#" cfsqltype="cf_sql_money">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.ENumbe r")>
           , ENumber =
           <cfif IsDefined("form.ENumber" & idx) AND form["ENumber" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.ENumber" & idx))#" cfsqltype="cf_sql_clob">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc tSName")>
           , ProductSName =
           <cfif IsDefined("form.ProductSNa me" & idx) AND form["ProductSName" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.ProductS Name" & idx))#" cfsqltype="cf_sql_clob">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc tName")>
           , ProductName =
           <cfif IsDefined("form.ProductNam e" & idx) AND form["ProductName" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.ProductN ame" & idx))#" cfsqltype="cf_sql_clob">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Profit _pct")>
           , Profit_pct =
           <cfif IsDefined("form.Profit_pct " & idx) AND form["Profit_pct" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.Profit_p ct" & idx))#" cfsqltype="cf_sql_clob">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Descri ption")>
           , Description =
           <cfif IsDefined("form.Descriptio n" & idx) AND form["Description" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.Descript ion" & idx))#" cfsqltype="cf_sql_varchar" >
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Weight ")>
           , Weight =
           <cfif IsDefined("form.Weight" & idx) AND form["Weight" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.Weight" & idx))#" cfsqltype="cf_sql_varchar" >
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsBook ")>
           , IsBook =
           <cfif IsDefined("form.IsBook" & idx) AND form["IsBook" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsBook" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsCata log")>
           , IsCatalog =
           <cfif IsDefined("form.IsCatalog" & idx) AND form["IsCatalog" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsCatalo g" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsChoc olate")>
           , IsChocolate =
           <cfif IsDefined("form.IsChocolat e" & idx) AND form["IsChocolate" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsChocol ate" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsFood ")>
           , IsFood =
           <cfif IsDefined("form.IsFood" & idx) AND form["IsFood" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsFood" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsMedi a")>
           , IsMedia =
           <cfif IsDefined("form.IsMedia" & idx) AND form["IsMedia" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsMedia" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPerm ")>
           , IsPerm =
           <cfif IsDefined("form.IsPerm" & idx) AND form["IsPerm" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsPerm" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPrin t")>
           , IsPrint =
           <cfif IsDefined("form.IsPrint" & idx) AND form["IsPrint" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsPrint" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsScho olsupp")>
           , IsSchoolsupp =
           <cfif IsDefined("form.IsSchoolsu pp" & idx) AND form["IsSchoolsupp" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsSchool supp" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsWrap sCatalog") >
           , IsWrapsCatalog =
           <cfif IsDefined("form.IsWrapsCat alog" & idx) AND form["IsWrapsCatalog" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.IsWrapsC atalog" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Active ")>
           , Active =
           <cfif IsDefined("form.Active" & idx) AND form["Active" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.Active" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Taxabl e")>
           , Taxable =
           <cfif IsDefined("form.Taxable" & idx) AND form["Taxable" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.Taxable" & idx))#" cfsqltype="cf_sql_bit">
           <cfelse>
           ''
           </cfif>
      </CFIF>
<CFIF IsDefined("GetProds.Wareho useID")>
           , WarehouseID =
           <cfif IsDefined("form.WarehouseI D" & idx) AND form["WarehouseID" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for m.Warehous eID" & idx))#" cfsqltype="cf_sql_integer" >
           <cfelse>
           ''
           </cfif>
      </CFIF>
Where Products.ProductID = <cfqueryparam value="#Trim(Evaluate("for m.ProductI D" &Â idx))#" cfsqltype="cf_sql_numeric" >
<!--- Update ProMatx
Set InStock  =
      <cfif  IsDefined("form.InStock" & idx) AND form["InStock"&  idx] NEQ "">
      <cfqueryparam value="#Trim(Evaluate("for m.InStock" & idx))#" cfsqltype="cf_sql_smallint ">
      <cfelse>
  ''
       </cfif>
  , relevel =
      <cfif IsDefined("form.relevel" & idx) AND form["relevel" & idx] NEQ "">
      <cfqueryparam value="#Trim(Evaluate("for m.relevel" & idx))#" cfsqltype="cf_sql_smallint ">
      <cfelse>
  ''
       </cfif>
Where ProMatx.ProductID = <cfqueryparam value="#Trim(Evaluate("for m.ProductI D" &Â idx))#" cfsqltype="cf_sql_numeric" > --->
</cfquery>
</cfloop>
</cfif>
<!--- Query change on 10/03/07 per EE recoomendation. New query below --->
<!--- <cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp an(0,0,30, 0)#>
SELECT ProMatx.ProductID,cats.Inf ormation,c ats.Catego ryID,
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      <cfif IsDefined("Category_ID">
      AND cats.CategoryID = Products.CategoryID
      </cfif>
</cfquery> --->
<cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp an(0,0,30, 0)#>
SELECT ProMatx.ProductID,cats.Inf ormation,c ats.Catego ryID,
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      AND      cats.CategoryID = Products.CategoryID
      <cfif IsDefined("form.Category_I D")AND form.Category_ID GT 0>
           AND cats.CategoryID = '#form.Category_ID#'
      </cfif>
</cfquery>
<cfif IsDefined("form.Category_I D")AND form.Category_ID GT 0>
rc====<cfoutput>#form.Cate gory_ID#</ cfoutput>
<cfelse>
rc====00000000000
</cfif>
<cfif IsDefined("Category_ID") AND IsDefined("Information")>
<cfoutput> Selected Catid = #Category_ID# - #Information#</cfoutput><b r />
<cfelse>
No cat selected<br />
</cfif>
<cfif IsDefined("Category_ID")>
      <cfoutput><cfloop query="getprods" startrow="1" endrow="10">cat ID is #getprods.ProductID#--#get prods.Cate goryID# - #getprods.Information#<br /></cfloop></cfoutput>
<cfelse>
      cat ID is ??????
</cfif>
<cfset MaxRows_GetProds=15>
<cfset StartRow_GetProds=Min((Pag eNum_GetPr ods-1)*Max Rows_GetPr ods+1,Max( GetProds.R ecordCount ,1))>
<cfset EndRow_GetProds=Min(StartR ow_GetProd s+MaxRows_ GetProds-1 ,GetProds. RecordCoun t)>
<cfset TotalPages_GetProds=Ceilin g(GetProds .RecordCou nt/MaxRows _GetProds) >
<cfset QueryString_GetProds=Iif(C GI.QUERY_S TRING NEQ "",DE("&"&XMLFormat(CGI.QU ERY_STRING )),DE("")) >
<cfset tempPos=ListContainsNoCase (QueryStri ng_GetProd s,"PageNum _GetProds= ","&")>
<cfif tempPos NEQ 0>
 <cfset QueryString_GetProds=ListD eleteAt(Qu eryString_ GetProds,t empPos,"&" )>
</cfif>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Edit Products Update</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="/store/includes/css/ css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
      color: #0000FF;
}
a:visited {
      color: #0000FF;
}
a:hover {
      color: #FF0000;
}
-->
</style></head>
<body>
<form name="form1" id="form1" method="post" action="#CGI.Script_Name#" >
<p align="center" class="Header">Product Quick Edit
<cfoutput>
<div align="center" class="small_blue">Records #StartRow_GetProds# to #EndRow_GetProds# of #GetProds.RecordCount# </div>
</cfoutput>
</p>
<div align="center">
<table width="57%" border="1" bordercolor="#999999">
 <cfoutput>
  <tr>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds GT 1>
    <a href="#CurrentPage#?PageNu m_GetProds =1#QuerySt ring_GetPr ods#">| First |</a>
   </cfif></td>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds GT 1>
    <a href="#CurrentPage#?PageNu m_GetProds =#Max(Decr ementValue (PageNum_G etProds),1 )##QuerySt ring_GetPr ods#" class="productinfo">| Previous |</a>
   </cfif>
   </td>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds LT TotalPages_GetProds>
    <a href="#CurrentPage#?PageNu m_GetProds =#Min(Incr ementValue (PageNum_G etProds),T otalPages_ GetProds)# &editfield s=#editfie lds#">| Next |</a>
   </cfif></td>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds LT TotalPages_GetProds><a href="#CurrentPage#?PageNu m_GetProds =#TotalPag es_GetProd s#&editfie lds=#editf ields#">| Last |</a>
   </cfif></td>
       <td width="20%" align="center" class="subselectio"><a href="Products_qeList.cfm" >| List |</strong></a></td>
  </tr>
 </cfoutput>
</table>
</div>
<table border="1" align="left" cellpadding="1" cellspacing="2">
<tr>
<td width="25" class="Header"><div align="center"></div></td>
<td width="70" class="Header"><div align="center"><strong>Pro ductID</st rong></div ></td>
      <CFIF IsDefined("GetProds.SKU")>     Â
           <td width="70" class="Header"><div align="center"><strong>SKU </strong>< /div></td>
      </CFIF>
      <!--- <CFIF IsDefined("GetProds.InStoc k")>
           <td width="70" class="Header"><div align="center"><strong>In Stock</strong></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.releve l")>
           <td width="70" class="Header"><div align="center"><strong>Reo rder Level</strong></div></td>
      </CFIF> --->
      <CFIF IsDefined("GetProds.Active ")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsA ctive</str ong></div> </td>
      </CFIF>
      <CFIF IsDefined("GetProds.Taxabl e")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsT axable</st rong></div ></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsBook ")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsB ook</stron g></div></ td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsCata log")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsC atalog</st rong></div ></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsChoc olate")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsC hocolate</ strong></d iv></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsFood ")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsF ood</stron g></div></ td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsMedi a")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsM edia</stro ng></div>< /td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPerm ")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsP erm</stron g></div></ td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPrin t")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsP rint</stro ng></div>< /td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsScho olsupp")>
           <td width="80" align="center" class="Header"><div align="center"><strong>IsS choolSupp< /strong></ div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsWrap sCatalog") >
           <td width="80" align="center" class="Header"><div align="center"><strong>IsW rapsCatalo g</strong> </div></td >
      </CFIF>
      <CFIF IsDefined("GetProds.Produc tName")>
           <td width="80" align="center" class="Header"><div align="center"><strong>Tit le</strong ></div></t d>
      </CFIF>
      <CFIF IsDefined("GetProds.ENumbe r")>
           <td width="70" align="center" class="Header"><div align="center"><strong>IB Part No </strong></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.OBS")>
           <td width="70" align="center" class="Header"><div align="center"><strong>OBS </strong>< /div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc tSName")>
           <td width="80" align="center" class="Header"><div align="center"><strong>Thu mbnail</st rong></div ></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Profit _pct")>
           <td width="70" align="center" class="Header"><div align="center"><strong>Pro fit %</strong></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Descri ption")>
           <td width="70" align="center" class="Header"><div align="center"><strong>Des cription</ strong></d iv></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Catego ryID")>     Â
           <td width="70" class="Header"><div align="center"><strong>Cat egory</str ong></div> </td>
      </CFIF>
      <CFIF IsDefined("GetProds.Retail Price")>
           <td width="70" align="center" class="Header"><div align="center"><strong>RPr ice</stron g></div></ td>
      </CFIF>
      <CFIF IsDefined("GetProds.Wareho useID")>
           <td width="70" align="center" class="Header"><div align="center"><strong>Whs e</strong> </div></td >
      </CFIF>
      <CFIF IsDefined("GetProds.Weight ")>
           <td width="70" align="center" class="Header"><div align="center"><strong>Wei ght</stron g></div></ td>
      </CFIF>
</tr>
<!--- Set onblur color to white --->
<cfset obbgc = "this.style.backgroundColo r='##fffff f'">
<!--- Set onfocus color to yellow --->
<cfset ofbgc = "this.style.backgroundColo r='##fcff7 7'">
<!--- dumb3------------<cfdump var="#GetCats#" top="10"> --->
<cfoutput query="GetProds" startRow="#StartRow_GetPro ds#" maxRows="#MaxRows_GetProds #">
<tr valign="top" bgcolor="###iif(currentrow MOD 2,DE('ffffff'),DE('cccccc' ))#" onMouseOver="this.style.ba ckgroundCo lor='##ffc c99'" onMouseOut="this.style.bac kgroundCol or='###iif (currentro w MOD 2,DE('ffffff'),DE('cccccc' ))#'">
<td class="textblackbold"><div align="center">#GetProds.c urrentRow# </div></td >
<td class="textblacknormal"><d iv align="center">#GetProds.P roductID#
 <input name="ProductID#CurrentRow #" type="hidden" id="ProductID#CurrentRow#" value="#GetProds.ProductID #" onFocus="this.style.backgr oundColor= '##fcff77' " onBlur="this.style.backgro undColor=' ##ffffff'" />
</div></td>
      <CFIF IsDefined("GetProds.SKU")>     Â
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="SKU#CurrentRow#" type="text" id="SKU#CurrentRow#" value="#GetProds.SKU#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <!--- <CFIF IsDefined("GetProds.InStoc k")>
           <td align="center" class="textblacknormal"><d iv align="center">#GetProds.I nStock#
           <input name="InStock#CurrentRow#" type="hidden" id="InStock#CurrentRow#" value="#GetProds.InStock#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.releve l")>
           <td align="center" class="textblacknormal"><d iv align="center">#GetProds.r elevel#
           <input name="relevel#CurrentRow#" type="hidden" id="relevel#CurrentRow#" value="#GetProds.relevel#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF> --->
      <CFIF IsDefined("GetProds.Active ")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="Active#CurrentRow#" type="checkbox" id="Active#CurrentRow#" value="1" <cfif #GetProds.Active# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Taxabl e")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="Taxable#CurrentRow#" type="checkbox" id="Taxable#CurrentRow#" value="1" <cfif #GetProds.Taxable# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsBook ")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsBook#CurrentRow#" type="checkbox" id="IsBook#CurrentRow#" value="1" <cfif #GetProds.IsBook# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsCata log")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsCatalog#CurrentRow #" type="checkbox" id="IsCatalog#CurrentRow#" value="1" <cfif #GetProds.IsCatalog# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsChoc olate")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsChocolate#CurrentR ow#" type="checkbox" id="IsChocolate#CurrentRow #" value="1" <cfif #GetProds.IsChocolate# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsFood ")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsFood#CurrentRow#" type="checkbox" id="IsFood#CurrentRow#" value="1" <cfif #GetProds.IsFood# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsMedi a")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsMedia#CurrentRow#" type="checkbox" id="IsMedia#CurrentRow#" value="1" <cfif #GetProds.IsMedia# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPerm ")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsPerm#CurrentRow#" type="checkbox" id="IsPerm#CurrentRow#" value="1" <cfif #GetProds.IsPerm# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPrin t")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsPrint#CurrentRow#" type="checkbox" id="IsPrint#CurrentRow#" value="1" <cfif #GetProds.IsPrint# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsScho olsupp")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsSchoolsupp#Current Row#" type="checkbox" id="IsSchoolsupp#CurrentRo w#" value="1" <cfif #GetProds.IsSchoolsupp# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsWrap sCatalog") >
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="IsWrapsCatalog#Curre ntRow#" type="checkbox" id="IsWrapsCatalog#Current Row#" value="1" <cfif #GetProds.IsWrapsCatalog# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc tName")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <textarea name="ProductName#CurrentR ow#" cols="30" rows="2" onFocus="#ofbgc#" onBlur="#obbgc#">#HtmlEdit Format(Tri m(GetProds .ProductNa me))#</tex tarea></di v></td>
      </CFIF>
      <CFIF IsDefined("GetProds.ENumbe r")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="ENumber#CurrentRow#" type="text" id="ENumber#CurrentRow#" value="#GetProds.ENumber#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.OBS")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="OBS#CurrentRow#" type="text" id="OBS#CurrentRow#" value="#GetProds.OBS#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc tSName")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <textarea name="ProductSName#Current Row#" cols="30" rows="1" onFocus="#ofbgc#" onBlur="#obbgc#">#HtmlEdit Format(Tri m(GetProds .ProductSN ame))#</te xtarea></d iv></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Profit _pct")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="Profit_pct#CurrentRo w#" type="text" id="Profit_pct#CurrentRow# " value="#GetProds.Profit_pc t#" size="6" maxlength="6" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Descri ption")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <textarea name="Description#CurrentR ow#" cols="40" rows="4" onFocus="#ofbgc#" onBlur="#obbgc#">#HtmlEdit Format(Tri m(GetProds .Descripti on))#</tex tarea></di v></td>
      </CFIF>
      <!--- <CFIF IsDefined("GetCatID.Catego ryID") AND IsDefined("GetProds.Catego ryID")>
           <td align="center" class="textblacknormal"><d iv align="center">
            <input name="CategoryID#CurrentRo w#"id="Cat egoryID#Cu rrentRow#" value="#GetCatID.Informati on#" size="20" maxlength="50" onfocus="#ofbgc#" onblur="#obbgc#"></textare a></div></ td>
      </CFIF> --->
      <CFIF IsDefined("GetProds.Catego ryID")>
           <td align="center" class="textblacknormal"><d iv align="center">
            <input name="CategoryID#CurrentRo w#" id="CategoryID#CurrentRow# " value="#GetProds.CategoryI D#" size="20" maxlength="50" onFocus="#ofbgc#" onBlur="#obbgc#"></textare a></div></ td>
      </CFIF>
      <CFIF IsDefined("GetProds.Retail Price")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="RetailPrice#CurrentR ow#" type="text" id="RetailPrice#CurrentRow #" value="#GetProds.RetailPri ce#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <!--- <CFIF IsDefined("GetWID.Warehous eID") AND IsDefined("GetProds.Wareho useID")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="WarehouseID#CurrentR ow#" type="text" id="WarehouseID#CurrentRow #" value="#GetWID.WarehouseCo de#" size="6" maxlength="6" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF> --->
      <CFIF IsDefined("GetProds.Wareho useID")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="WarehouseID#CurrentR ow#" type="text" id="WarehouseID#CurrentRow #" value="#GetProds.Warehouse ID#" size="6" maxlength="6" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Weight ")>
           <td align="center" class="textblacknormal"><d iv align="center">
           <input name="Weight#CurrentRow#" type="text" id="Weight#CurrentRow#" value="#GetProds.Weight#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
</tr>
</cfoutput>
           <CFLOOP QUERY="Getprods">
<!--- loop the query to put all the product id's into a list for later use --->
                      <cfset lstProductIDs = ListAppend(editfields, "")>
           </cfloop>     Â
<tr align="center">
<td colspan="12">
<input name="CategoryID" type="hidden" value="form.Custom6" />
<input name="CategoryID" type="hidden" value="form.CategoryID" />
<input name="relevel" type="hidden" value="form.relevel" />
<input name="InStock" type="hidden" value="form.InStock" />
<input name="Weight" type="hidden" value="form.Weight" />
<input name="WarehouseID" type="hidden" value="form.WarehouseID" />
<input name="WarehouseCode" type="hidden" value="form.WarehouseID" />
<input name="Description" type="hidden" value="form.Description" />
<input name="OBS" type="hidden" value="form.OBS" />
<input name="SKU" type="hidden" value="form.SKU" />
<input name="RetailPrice" type="hidden" value="form.RetailPrice" />
<input name="ENumber" type="hidden" value="form.ENumber" />
<input name="ProductSName" type="hidden" value="form.ProductSName" />
<input name="ProductName" type="hidden" value="form.ProductName" />
<input name="Profit_pct" type="hidden" value="form.Profit_pct" />
<input name="Reset" type="reset" class="small_blue" value="Reset" />
<input name="Submit" type="submit" class="small_red" value="Update" />
<input name="Submit2" type="hidden" value="Update" />
<input type="hidden" name="MM_UpdateRecord" value="form1">
<cfoutput>
<input name="startCount" type="hidden" value="#StartRow_GetProds# " />
<input name="endCount" type="hidden" value="#EndRow_GetProds#" />
<input name="editfields" type="hidden" value="#editfields#" />
</cfoutput>
</td>
</tr>
</table>
</form>
</body>
</html>
--------------------------
<CFIF Getcats.recordcount is not 0>
       <p><SELECT NAME="Category_ID" SIZE="6" class="textblacknormal">
             <CFOUTPUT QUERY="getcats">
              <CFIF Len("#Caption#") GT 20>
               <CFSET cTitle = "#Left("#Caption#", 20)#...">
                 <CFELSE>
               <CFSET cTitle = #Caption#>
               </CFIF>
                <OPTION VALUE="#CategoryID#">#cTit
             </SELECT>
              <CFELSE>
            <P>
            <FONT FACE=ARIAL color="#000080">No Categories Available</FONT></p>
           </CFIF>
--------------------------
This is the code from the results page: (it is a work in progress)
--------------------------
<cfset CurrentPage=GetFileFromPat
<cfparam name="PageNum_GetProds" default="1">
<cfset MaxRows_GetProds=15>
<cfparam name="RetailPrice" default="">
<cfparam name="ENumber" default="">
<cfparam name="OBS" default="">
<cfparam name="editfields" default="">
<cfparam name="relevel" default="">
<cfparam name="warehousecode" default="">
<cfparam name="Information" default="">
<cfparam name="cats.Information" default="">
<cfparam name="Category_ID" default="">
<!--- Query change on 10/03/07 per EE recoomendation. New query below --->
<!--- <cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp
SELECT ProMatx.ProductID,cats.Inf
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      <cfif IsDefined("Category_ID">
      AND cats.CategoryID = Products.CategoryID
      </cfif>
</cfquery> --->
<cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp
SELECT ProMatx.ProductID,cats.Inf
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      AND      cats.CategoryID = Products.CategoryID
      <cfif IsDefined("form.Category_I
           AND cats.CategoryID = '#form.Category_ID#'
      </cfif>
</cfquery>
<cfif IsDefined("form.Category_I
rc====<cfoutput>#form.Cate
<cfelse>
rc====00000000000
</cfif>
<cfquery name="GetCatID" datasource="GH234b">
SELECT <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>cats.CategoryID, cats.Information
FROM cats, Products
WHERE Products.CategoryID = cats.CategoryID
ORDER BY Products.ProductID
</cfquery>
      <cfif NOT IsDefined("session.editfie
           <cfset session.editfields = "#editfields#">
           <cfelse>
      </cfif>
      <!--- <cfoutput>#Session.EditFie
<cfif IsDefined("FORM.MM_UpdateR
<cfloop index="idx" from="#form.startCount#" to="#form.endCount#">
<cfquery datasource="GH234b">
Update Products
Set Custom6 =
           <cfif IsDefined("form.Custom6" & idx) AND form["Custom6" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      <CFIF IsDefined("GetProds.SKU")>
           , SKU =
           <cfif IsDefined("form.SKU" & idx) AND form["SKU" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.OBS")>
           , OBS =
           <cfif IsDefined("form.OBS" & idx) AND form["OBS"& idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Retail
           , RetailPrice =
           <cfif IsDefined("form.RetailPric
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.ENumbe
           , ENumber =
           <cfif IsDefined("form.ENumber" & idx) AND form["ENumber" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc
           , ProductSName =
           <cfif IsDefined("form.ProductSNa
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc
           , ProductName =
           <cfif IsDefined("form.ProductNam
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Profit
           , Profit_pct =
           <cfif IsDefined("form.Profit_pct
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Descri
           , Description =
           <cfif IsDefined("form.Descriptio
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Weight
           , Weight =
           <cfif IsDefined("form.Weight" & idx) AND form["Weight" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsBook
           , IsBook =
           <cfif IsDefined("form.IsBook" & idx) AND form["IsBook" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsCata
           , IsCatalog =
           <cfif IsDefined("form.IsCatalog"
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsChoc
           , IsChocolate =
           <cfif IsDefined("form.IsChocolat
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsFood
           , IsFood =
           <cfif IsDefined("form.IsFood" & idx) AND form["IsFood" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsMedi
           , IsMedia =
           <cfif IsDefined("form.IsMedia" & idx) AND form["IsMedia" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPerm
           , IsPerm =
           <cfif IsDefined("form.IsPerm" & idx) AND form["IsPerm" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPrin
           , IsPrint =
           <cfif IsDefined("form.IsPrint" & idx) AND form["IsPrint" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsScho
           , IsSchoolsupp =
           <cfif IsDefined("form.IsSchoolsu
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.IsWrap
           , IsWrapsCatalog =
           <cfif IsDefined("form.IsWrapsCat
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Active
           , Active =
           <cfif IsDefined("form.Active" & idx) AND form["Active" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
      <CFIF IsDefined("GetProds.Taxabl
           , Taxable =
           <cfif IsDefined("form.Taxable" & idx) AND form["Taxable" & idx] NEQ "">
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
<CFIF IsDefined("GetProds.Wareho
           , WarehouseID =
           <cfif IsDefined("form.WarehouseI
           <cfqueryparam value="#Trim(Evaluate("for
           <cfelse>
           ''
           </cfif>
      </CFIF>
Where Products.ProductID = <cfqueryparam value="#Trim(Evaluate("for
<!--- Update ProMatx
Set InStock  =
      <cfif  IsDefined("form.InStock" & idx) AND form["InStock"&  idx] NEQ "">
      <cfqueryparam value="#Trim(Evaluate("for
      <cfelse>
  ''
       </cfif>
  , relevel =
      <cfif IsDefined("form.relevel" & idx) AND form["relevel" & idx] NEQ "">
      <cfqueryparam value="#Trim(Evaluate("for
      <cfelse>
  ''
       </cfif>
Where ProMatx.ProductID = <cfqueryparam value="#Trim(Evaluate("for
</cfquery>
</cfloop>
</cfif>
<!--- Query change on 10/03/07 per EE recoomendation. New query below --->
<!--- <cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp
SELECT ProMatx.ProductID,cats.Inf
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      <cfif IsDefined("Category_ID">
      AND cats.CategoryID = Products.CategoryID
      </cfif>
</cfquery> --->
<cfquery name="GetProds" datasource="GH234b" cachedwithin=#CreateTimeSp
SELECT ProMatx.ProductID,cats.Inf
      <CFLOOP index="field" list="#editfields#">
           Products.#Field#,
      </CFLOOP>ProMatx.InStock, ProMatx.relevel
FROM Products, ProMatx, Warehouses, cats
WHERE Products.ProductID = ProMatx.ProductID
      AND      cats.CategoryID = Products.CategoryID
      <cfif IsDefined("form.Category_I
           AND cats.CategoryID = '#form.Category_ID#'
      </cfif>
</cfquery>
<cfif IsDefined("form.Category_I
rc====<cfoutput>#form.Cate
<cfelse>
rc====00000000000
</cfif>
<cfif IsDefined("Category_ID") AND IsDefined("Information")>
<cfoutput> Selected Catid = #Category_ID# - #Information#</cfoutput><b
<cfelse>
No cat selected<br />
</cfif>
<cfif IsDefined("Category_ID")>
      <cfoutput><cfloop query="getprods" startrow="1" endrow="10">cat ID is #getprods.ProductID#--#get
<cfelse>
      cat ID is ??????
</cfif>
<cfset MaxRows_GetProds=15>
<cfset StartRow_GetProds=Min((Pag
<cfset EndRow_GetProds=Min(StartR
<cfset TotalPages_GetProds=Ceilin
<cfset QueryString_GetProds=Iif(C
<cfset tempPos=ListContainsNoCase
<cfif tempPos NEQ 0>
 <cfset QueryString_GetProds=ListD
</cfif>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Edit Products Update</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="/store/includes/css/
<style type="text/css">
<!--
a:link {
      color: #0000FF;
}
a:visited {
      color: #0000FF;
}
a:hover {
      color: #FF0000;
}
-->
</style></head>
<body>
<form name="form1" id="form1" method="post" action="#CGI.Script_Name#"
<p align="center" class="Header">Product Quick Edit
<cfoutput>
<div align="center" class="small_blue">Records
</cfoutput>
</p>
<div align="center">
<table width="57%" border="1" bordercolor="#999999">
 <cfoutput>
  <tr>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds GT 1>
    <a href="#CurrentPage#?PageNu
   </cfif></td>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds GT 1>
    <a href="#CurrentPage#?PageNu
   </cfif>
   </td>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds LT TotalPages_GetProds>
    <a href="#CurrentPage#?PageNu
   </cfif></td>
   <td width="20%" align="center" class="subselectio"><cfif PageNum_GetProds LT TotalPages_GetProds><a href="#CurrentPage#?PageNu
   </cfif></td>
       <td width="20%" align="center" class="subselectio"><a href="Products_qeList.cfm"
  </tr>
 </cfoutput>
</table>
</div>
<table border="1" align="left" cellpadding="1" cellspacing="2">
<tr>
<td width="25" class="Header"><div align="center"></div></td>
<td width="70" class="Header"><div align="center"><strong>Pro
      <CFIF IsDefined("GetProds.SKU")>
           <td width="70" class="Header"><div align="center"><strong>SKU
      </CFIF>
      <!--- <CFIF IsDefined("GetProds.InStoc
           <td width="70" class="Header"><div align="center"><strong>In Stock</strong></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.releve
           <td width="70" class="Header"><div align="center"><strong>Reo
      </CFIF> --->
      <CFIF IsDefined("GetProds.Active
           <td width="80" align="center" class="Header"><div align="center"><strong>IsA
      </CFIF>
      <CFIF IsDefined("GetProds.Taxabl
           <td width="80" align="center" class="Header"><div align="center"><strong>IsT
      </CFIF>
      <CFIF IsDefined("GetProds.IsBook
           <td width="80" align="center" class="Header"><div align="center"><strong>IsB
      </CFIF>
      <CFIF IsDefined("GetProds.IsCata
           <td width="80" align="center" class="Header"><div align="center"><strong>IsC
      </CFIF>
      <CFIF IsDefined("GetProds.IsChoc
           <td width="80" align="center" class="Header"><div align="center"><strong>IsC
      </CFIF>
      <CFIF IsDefined("GetProds.IsFood
           <td width="80" align="center" class="Header"><div align="center"><strong>IsF
      </CFIF>
      <CFIF IsDefined("GetProds.IsMedi
           <td width="80" align="center" class="Header"><div align="center"><strong>IsM
      </CFIF>
      <CFIF IsDefined("GetProds.IsPerm
           <td width="80" align="center" class="Header"><div align="center"><strong>IsP
      </CFIF>
      <CFIF IsDefined("GetProds.IsPrin
           <td width="80" align="center" class="Header"><div align="center"><strong>IsP
      </CFIF>
      <CFIF IsDefined("GetProds.IsScho
           <td width="80" align="center" class="Header"><div align="center"><strong>IsS
      </CFIF>
      <CFIF IsDefined("GetProds.IsWrap
           <td width="80" align="center" class="Header"><div align="center"><strong>IsW
      </CFIF>
      <CFIF IsDefined("GetProds.Produc
           <td width="80" align="center" class="Header"><div align="center"><strong>Tit
      </CFIF>
      <CFIF IsDefined("GetProds.ENumbe
           <td width="70" align="center" class="Header"><div align="center"><strong>IB Part No </strong></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.OBS")>
           <td width="70" align="center" class="Header"><div align="center"><strong>OBS
      </CFIF>
      <CFIF IsDefined("GetProds.Produc
           <td width="80" align="center" class="Header"><div align="center"><strong>Thu
      </CFIF>
      <CFIF IsDefined("GetProds.Profit
           <td width="70" align="center" class="Header"><div align="center"><strong>Pro
      </CFIF>
      <CFIF IsDefined("GetProds.Descri
           <td width="70" align="center" class="Header"><div align="center"><strong>Des
      </CFIF>
      <CFIF IsDefined("GetProds.Catego
           <td width="70" class="Header"><div align="center"><strong>Cat
      </CFIF>
      <CFIF IsDefined("GetProds.Retail
           <td width="70" align="center" class="Header"><div align="center"><strong>RPr
      </CFIF>
      <CFIF IsDefined("GetProds.Wareho
           <td width="70" align="center" class="Header"><div align="center"><strong>Whs
      </CFIF>
      <CFIF IsDefined("GetProds.Weight
           <td width="70" align="center" class="Header"><div align="center"><strong>Wei
      </CFIF>
</tr>
<!--- Set onblur color to white --->
<cfset obbgc = "this.style.backgroundColo
<!--- Set onfocus color to yellow --->
<cfset ofbgc = "this.style.backgroundColo
<!--- dumb3------------<cfdump var="#GetCats#" top="10"> --->
<cfoutput query="GetProds" startRow="#StartRow_GetPro
<tr valign="top" bgcolor="###iif(currentrow
<td class="textblackbold"><div
<td class="textblacknormal"><d
 <input name="ProductID#CurrentRow
</div></td>
      <CFIF IsDefined("GetProds.SKU")>
           <td align="center" class="textblacknormal"><d
           <input name="SKU#CurrentRow#" type="text" id="SKU#CurrentRow#" value="#GetProds.SKU#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <!--- <CFIF IsDefined("GetProds.InStoc
           <td align="center" class="textblacknormal"><d
           <input name="InStock#CurrentRow#"
      </CFIF>
      <CFIF IsDefined("GetProds.releve
           <td align="center" class="textblacknormal"><d
           <input name="relevel#CurrentRow#"
      </CFIF> --->
      <CFIF IsDefined("GetProds.Active
           <td align="center" class="textblacknormal"><d
           <input name="Active#CurrentRow#" type="checkbox" id="Active#CurrentRow#" value="1" <cfif #GetProds.Active# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Taxabl
           <td align="center" class="textblacknormal"><d
           <input name="Taxable#CurrentRow#"
      </CFIF>
      <CFIF IsDefined("GetProds.IsBook
           <td align="center" class="textblacknormal"><d
           <input name="IsBook#CurrentRow#" type="checkbox" id="IsBook#CurrentRow#" value="1" <cfif #GetProds.IsBook# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsCata
           <td align="center" class="textblacknormal"><d
           <input name="IsCatalog#CurrentRow
      </CFIF>
      <CFIF IsDefined("GetProds.IsChoc
           <td align="center" class="textblacknormal"><d
           <input name="IsChocolate#CurrentR
      </CFIF>
      <CFIF IsDefined("GetProds.IsFood
           <td align="center" class="textblacknormal"><d
           <input name="IsFood#CurrentRow#" type="checkbox" id="IsFood#CurrentRow#" value="1" <cfif #GetProds.IsFood# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsMedi
           <td align="center" class="textblacknormal"><d
           <input name="IsMedia#CurrentRow#"
      </CFIF>
      <CFIF IsDefined("GetProds.IsPerm
           <td align="center" class="textblacknormal"><d
           <input name="IsPerm#CurrentRow#" type="checkbox" id="IsPerm#CurrentRow#" value="1" <cfif #GetProds.IsPerm# is 1> checked</cfif> onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.IsPrin
           <td align="center" class="textblacknormal"><d
           <input name="IsPrint#CurrentRow#"
      </CFIF>
      <CFIF IsDefined("GetProds.IsScho
           <td align="center" class="textblacknormal"><d
           <input name="IsSchoolsupp#Current
      </CFIF>
      <CFIF IsDefined("GetProds.IsWrap
           <td align="center" class="textblacknormal"><d
           <input name="IsWrapsCatalog#Curre
      </CFIF>
      <CFIF IsDefined("GetProds.Produc
           <td align="center" class="textblacknormal"><d
           <textarea name="ProductName#CurrentR
      </CFIF>
      <CFIF IsDefined("GetProds.ENumbe
           <td align="center" class="textblacknormal"><d
           <input name="ENumber#CurrentRow#"
      </CFIF>
      <CFIF IsDefined("GetProds.OBS")>
           <td align="center" class="textblacknormal"><d
           <input name="OBS#CurrentRow#" type="text" id="OBS#CurrentRow#" value="#GetProds.OBS#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
      <CFIF IsDefined("GetProds.Produc
           <td align="center" class="textblacknormal"><d
           <textarea name="ProductSName#Current
      </CFIF>
      <CFIF IsDefined("GetProds.Profit
           <td align="center" class="textblacknormal"><d
           <input name="Profit_pct#CurrentRo
      </CFIF>
      <CFIF IsDefined("GetProds.Descri
           <td align="center" class="textblacknormal"><d
           <textarea name="Description#CurrentR
      </CFIF>
      <!--- <CFIF IsDefined("GetCatID.Catego
           <td align="center" class="textblacknormal"><d
            <input name="CategoryID#CurrentRo
      </CFIF> --->
      <CFIF IsDefined("GetProds.Catego
           <td align="center" class="textblacknormal"><d
            <input name="CategoryID#CurrentRo
      </CFIF>
      <CFIF IsDefined("GetProds.Retail
           <td align="center" class="textblacknormal"><d
           <input name="RetailPrice#CurrentR
      </CFIF>
      <!--- <CFIF IsDefined("GetWID.Warehous
           <td align="center" class="textblacknormal"><d
           <input name="WarehouseID#CurrentR
      </CFIF> --->
      <CFIF IsDefined("GetProds.Wareho
           <td align="center" class="textblacknormal"><d
           <input name="WarehouseID#CurrentR
      </CFIF>
      <CFIF IsDefined("GetProds.Weight
           <td align="center" class="textblacknormal"><d
           <input name="Weight#CurrentRow#" type="text" id="Weight#CurrentRow#" value="#GetProds.Weight#" size="8" maxlength="8" onFocus="#ofbgc#" onBlur="#obbgc#" /></div></td>
      </CFIF>
</tr>
</cfoutput>
           <CFLOOP QUERY="Getprods">
<!--- loop the query to put all the product id's into a list for later use --->
                      <cfset lstProductIDs = ListAppend(editfields, "")>
           </cfloop>     Â
<tr align="center">
<td colspan="12">
<input name="CategoryID" type="hidden" value="form.Custom6" />
<input name="CategoryID" type="hidden" value="form.CategoryID" />
<input name="relevel" type="hidden" value="form.relevel" />
<input name="InStock" type="hidden" value="form.InStock" />
<input name="Weight" type="hidden" value="form.Weight" />
<input name="WarehouseID" type="hidden" value="form.WarehouseID" />
<input name="WarehouseCode" type="hidden" value="form.WarehouseID" />
<input name="Description" type="hidden" value="form.Description" />
<input name="OBS" type="hidden" value="form.OBS" />
<input name="SKU" type="hidden" value="form.SKU" />
<input name="RetailPrice" type="hidden" value="form.RetailPrice" />
<input name="ENumber" type="hidden" value="form.ENumber" />
<input name="ProductSName" type="hidden" value="form.ProductSName" />
<input name="ProductName" type="hidden" value="form.ProductName" />
<input name="Profit_pct" type="hidden" value="form.Profit_pct" />
<input name="Reset" type="reset" class="small_blue" value="Reset" />
<input name="Submit" type="submit" class="small_red" value="Update" />
<input name="Submit2" type="hidden" value="Update" />
<input type="hidden" name="MM_UpdateRecord" value="form1">
<cfoutput>
<input name="startCount" type="hidden" value="#StartRow_GetProds#
<input name="endCount" type="hidden" value="#EndRow_GetProds#" />
<input name="editfields" type="hidden" value="#editfields#" />
</cfoutput>
</td>
</tr>
</table>
</form>
</body>
</html>
> The query is partially working. I get the results on the first page but it does not show any
>Â additional pages. I have it set for 15 records per page and I know with the selection I did
>Â that there are multiple pages.
First let's figure out why that's happening. Â Is the "GetProds" query actually returning more than 15 records? Â If its not, that explains why you're not seeing additional pages. Â Dump the query and see how many records it contains
<cfdump var="#GetProds#">
>Â additional pages. I have it set for 15 records per page and I know with the selection I did
>Â that there are multiple pages.
First let's figure out why that's happening. Â Is the "GetProds" query actually returning more than 15 records? Â If its not, that explains why you're not seeing additional pages. Â Dump the query and see how many records it contains
<cfdump var="#GetProds#">
ASKER
Your are correct. Stupid oversight on my part. the correct counts are coming back.
The updates still are not functioning. they were working before.The page shows correct when first selecting. Then when I change any of the fields and submit it comes back with all the records not the selected "Category_ID" records. And the updates are not present. No errors come back.
The updates still are not functioning. they were working before.The page shows correct when first selecting. Then when I change any of the fields and submit it comes back with all the records not the selected "Category_ID" records. And the updates are not present. No errors come back.
> Then when I change any of the fields and submit it comes back with all the records not
>Â the selected "Category_ID" records.
Sounds like the "Category_ID" value isn't submitted with the update form or in the navigation links.  So  this code never runs because "Category_ID" doesn't exist.
<cfif IsDefined("form.Category_I D")AND form.Category_ID GT 0>
      AND cats.CategoryID = '#form.Category_ID#'
</cfif>
But if "Category_ID" can be either a form or url parameter, you may need to remove the scope
<cfif IsDefined("Category_ID")AN D Category_ID GT 0>
      AND cats.CategoryID = '#Category_ID#'
</cfif>
>Â the selected "Category_ID" records.
Sounds like the "Category_ID" value isn't submitted with the update form or in the navigation links.  So  this code never runs because "Category_ID" doesn't exist.
<cfif IsDefined("form.Category_I
      AND cats.CategoryID = '#form.Category_ID#'
</cfif>
But if "Category_ID" can be either a form or url parameter, you may need to remove the scope
<cfif IsDefined("Category_ID")AN
      AND cats.CategoryID = '#Category_ID#'
</cfif>
As far as the updates go, Â I would fix the other issues first. Â Then if the updates still aren't working, Â place some debugging code before the update section to determine if that section is executing at all.
<cfoutput>
IsDefined("FORM.MM_UpdateR ecord") = #IsDefined("FORM.MM_Update Record")#< br>
FORM.MM_UpdateRecord EQ "form1" = #(FORM.MM_UpdateRecord EQ "form1")#<br>
from="#form.startCount#"<b r>
to="#form.endCount#"<br>
</cfoutput>
<cfoutput>
IsDefined("FORM.MM_UpdateR
FORM.MM_UpdateRecord EQ "form1" = #(FORM.MM_UpdateRecord EQ "form1")#<br>
from="#form.startCount#"<b
to="#form.endCount#"<br>
</cfoutput>
ASKER
I changed the scope and got back the same results.
Yes, but did you add the "Category_ID" value to the form and/or navigation links? Â If you're not passing the selected category to subsequent pages, it will always revert to "all categories".
ASKER
but did you add the "Category_ID" value to the form and/or navigation links? I tried to add them with the results the same. I added,
<cfif cgi.request_method is "post">
 <cfdump var="#form#">
</cfif>
To see if the values passed. The category_ID was correct on the first page but when submitting for an update it did not hold the value. Even if I added it to links and hidden fields. Please let me know what you suggestions you have. Thanks,,,
<cfif cgi.request_method is "post">
 <cfdump var="#form#">
</cfif>
To see if the values passed. The category_ID was correct on the first page but when submitting for an update it did not hold the value. Even if I added it to links and hidden fields. Please let me know what you suggestions you have. Thanks,,,
> <cfif cgi.request_method is "post">
>Â <cfdump var="#form#">
>Â </cfif>
Btw, you can dump the FORM or ULR scope without the CFIF. Â If its not a form post/get the results will just be empty.
>Â Even if I added it to links and hidden fields.
What do you mean did not hold the value? Â The value was blank ""Â or the variable didn't exist at all? Â Can you post the code showing how you added it to the link and hidden fields?
>Â <cfdump var="#form#">
>Â </cfif>
Btw, you can dump the FORM or ULR scope without the CFIF. Â If its not a form post/get the results will just be empty.
>Â Even if I added it to links and hidden fields.
What do you mean did not hold the value? Â The value was blank ""Â or the variable didn't exist at all? Â Can you post the code showing how you added it to the link and hidden fields?
ASKER
Can you post the code showing how you added it to the link and hidden fields?
hidden field - <input name="Category_ID" type="hidden" />
link - <form name="form1" id="form1" method="post" action="#CGI.Script_Name#? categoryid =<cfoutput >#form.cat egory_id#< /cfoutput> ">
hidden field - <input name="Category_ID" type="hidden" />
link - <form name="form1" id="form1" method="post" action="#CGI.Script_Name#?
The hidden field is missing a value
<cfoutput>- <input name="Category_ID" type="hidden" Â value="#Category_ID#"/></c foutput>
>Â <form name="form1" id="form1" method="post"
>Â action="#CGI.Script_Name#? categoryid =<cfoutput >#form.cat egory_id#< /cfoutput> ">
If you're storing the value in a hidden form field, don't add it to the action URL. Â
These are the navigation links I was referring to:
<a href="#CurrentPage#?PageNu m_GetProds =#Max(Decr ementValue (PageNum_G etProds),1 )##QuerySt ring_GetPr ods#" class="productinfo">| Previous |</a>
   </cfif>
<cfoutput>- <input name="Category_ID" type="hidden" Â value="#Category_ID#"/></c
>Â <form name="form1" id="form1" method="post"
>Â action="#CGI.Script_Name#?
If you're storing the value in a hidden form field, don't add it to the action URL. Â
These are the navigation links I was referring to:
<a href="#CurrentPage#?PageNu
   </cfif>
ASKER
I actually had the value but got an error. the one thing I didn't do was add the cfoutput statement. I did that and the page stays the same.
I will add debug code to see if I can figure out why it isn't updating.
I will add debug code to see if I can figure out why it isn't updating.
ASKER
The  cachedwithin=#CreateTimeSp an(0,0,30, 0)# in the query was holding on to the values. When i did a dump I saw the field values were actually updating from the database but the table was not. As soon a i removed the cache statement it started to work.
Question - I read that using the cachedwithin made the query more efficient. What are your comments on this?
Also one last thing is that the Category field is always selected. I'll take a look at that.
Question - I read that using the cachedwithin made the query more efficient. What are your comments on this?
Also one last thing is that the Category field is always selected. I'll take a look at that.
> I read that using the cachedwithin made the query more efficient. What are your comments on this?
It usually does. The reason is that the query is pulled from memory (within the timespan you specify). Â Pulling the query from memory is usually more efficient that retrieving the data from the database every time. Â But if the data is frequently updated, it may not be worth it. Â If you do decide to use cachedwithin, you would have to remember to clear the query every time you update. Â
It usually does. The reason is that the query is pulled from memory (within the timespan you specify). Â Pulling the query from memory is usually more efficient that retrieving the data from the database every time. Â But if the data is frequently updated, it may not be worth it. Â If you do decide to use cachedwithin, you would have to remember to clear the query every time you update. Â
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
It looks like everything is functioning. Thanks again for all your extended help.
You're welcome. Glad its working.
Also, you're missing a join between "Cats" and the other two tables
FROM Products, ProductMatrix, Cats
WHERE Products.ProductID = ProductMatrix.ProductID
AND Â Â Cats.SomeField = OneOfTheOtherTables.SomeFi