Hi again Her it is. I have taken screen grabs of everything as pics giove a better picture
of what's going on that words do. So these first 2 pics show my sample database, I had to split it as it was too long to fit on 1 pic. [url]http://i170.photobucket.com/albums/u271/Abernus/Database1.jpg[/url][url]http://i170.photobucket.com/albums/u271/Abernus/Database2.jpg[/url]Now this next pic is of the file Default.asp and shows the layout and Form settings from where the user can make the choice of what to search the database by:[url]http://i170.photobucket.com/albums/u271/Abernus/Default.jpg[/url]This is the full code behind it: <%@LANGUAGE="VBSCRIPT"%><!--#include file="Connections/Mythos1.asp" --><%Dim Recordset1Dim Recordset1_numRowsSet Recordset1 = Server.CreateObject("ADODB.Recordset")Recordset1.ActiveConnection = MM_Mythos1_STRINGRecordset1.Source = "SELECT * FROM Builds"Recordset1.CursorType = 0Recordset1.CursorLocation = 2Recordset1.LockType = 1Recordset1.Open()Recordset1_numRows = 0%><style type="text/css"><!--.style2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 10px; }--></style><form name="form1" method="post" action="test.asp"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="43%"><p align="center" class="style2">Primary Profession <select name="Primary_Profession" id="Primary_Profession"> <option value="NULL">Please Select</option> <option value="Monk">Monk</option> <option value="Necromancer">Necromancer</option> <option value="Ranger">Ranger</option> <option value="Elementalist">Elementalist</option> </select> </p> </td> <td width="34%"> <div align="center" class="style2"> Type Of Build <select name="Type_of_build" id="Type_of_build"> <option value="NULL">Please Select</option> <option value="Support">Support</option> <option value="Spike">Spike</option> </select> </div></td> <td width="23%"><div align="center" class="style2">Where Used <select name="Where_Used" id="Where_Used"> <option value="NULL">Please Select</option> <option value="GvG">GvG</option> <option value="HA">HA</option> <option value="PvP">PvP</option> </select> </div></td> </tr> </table> <p align="center"> <input type="submit" name="Submit" value="Submit"> </p></form><p> </p><p> </p><p> </p><%Recordset1.Close()Set Recordset1 = Nothing%>This is a screen shot of the file Test.asp. This is where the database is shown depending on what the user has selected. Also in the screen shot is the SQL setup etc.[url]http://i170.photobucket.com/albums/u271/Abernus/Test.jpg[/url]Here is the full code for this page:<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><!--#include file="../Connections/Builds.asp" --><%Dim Recordset1__Where_UsedRecordset1__Where_Used = "1"If (Request.Form("Where_Used") <> "") Then Recordset1__Where_Used = Request.Form("Where_Used") End If%><%Dim Recordset1__Primary_ProfessionRecordset1__Primary_Profession = "1"If (Request.Form("Primary_Profession") <> "") Then Recordset1__Primary_Profession = Request.Form("Primary_Profession") End If%><%Dim Recordset1__Type_of_BuildRecordset1__Type_of_Build = "1"If (Request.Form("Type_of_Build") <> "") Then Recordset1__Type_of_Build = Request.Form("Type_of_Build") End If%><%Dim Recordset1Dim Recordset1_numRowsSet Recordset1 = Server.CreateObject("ADODB.Recordset")Recordset1.ActiveConnection = MM_Builds_STRINGRecordset1.Source = "SELECT ID, " + Replace(Recordset1__Primary_Profession, "'", "''") + ", " + Replace(Recordset1__Type_of_Build, "'", "''") + ", " + Replace(Recordset1__Where_Used, "'", "''") + " FROM Builds WHERE ISNULL(@" + Replace(Recordset1__Type_of_Build, "'", "''") + ", " + Replace(Recordset1__Type_of_Build, "'", "''") + ") = " + Replace(Recordset1__Type_of_Build, "'", "''") + " AND ISNULL(@" + Replace(Recordset1__Where_Used, "'", "''") + ", " + Replace(Recordset1__Where_Used, "'", "''") + ") = " + Replace(Recordset1__Where_Used, "'", "''") + ""Recordset1.CursorType = 0Recordset1.CursorLocation = 2Recordset1.LockType = 1Recordset1.Open()Recordset1_numRows = 0%><%Dim Repeat1__numRowsDim Repeat1__indexRepeat1__numRows = -1Repeat1__index = 0Recordset1_numRows = Recordset1_numRows + Repeat1__numRows%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Untitled Document</title><style type="text/css"><!--.style2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 10px; }--></style></head><body><table border="1"> <tr> <td>ID</td> <td>Build_Name</td> <td>Primary_Profession</td> <td>Secondary_Profession</td> <td>Attribute1</td> <td>Value1</td> <td>Attribute2</td> <td>Value2</td> <td>Attribute3</td> <td>Value3</td> <td>Attribute4</td> <td>Value4</td> <td>Attribute5</td> <td>Value5</td> <td>Attribute6</td> <td>Value6</td> <td>Skill1</td> <td>Skill2</td> <td>Skill3</td> <td>Skill4</td> <td>Skill5</td> <td>Skill6</td> <td>Skill7</td> <td>Skill8</td> <td>Equipemen</td> <td>Runes</td> <td>Type_of_Build</td> <td>Where_Used</td> </tr> <% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %> <tr> <td><%=(Recordset1.Fields.Item("ID").Value)%></td> <td><%=(Recordset1.Fields.Item("Build_Name").Value)%></td> <td><%=(Recordset1.Fields.Item("Primary_Profession").Value)%></td> <td><%=(Recordset1.Fields.Item("Secondary_Profession").Value)%></td> <td><%=(Recordset1.Fields.Item("Attribute1").Value)%></td> <td><%=(Recordset1.Fields.Item("Value1").Value)%></td> <td><%=(Recordset1.Fields.Item("Attribute2").Value)%></td> <td><%=(Recordset1.Fields.Item("Value2").Value)%></td> <td><%=(Recordset1.Fields.Item("Attribute3").Value)%></td> <td><%=(Recordset1.Fields.Item("Value3").Value)%></td> <td><%=(Recordset1.Fields.Item("Attribute4").Value)%></td> <td><%=(Recordset1.Fields.Item("Value4").Value)%></td> <td><%=(Recordset1.Fields.Item("Attribute5").Value)%></td> <td><%=(Recordset1.Fields.Item("Value5").Value)%></td> <td><%=(Recordset1.Fields.Item("Attribute6").Value)%></td> <td><%=(Recordset1.Fields.Item("Value6").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill1").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill2").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill3").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill4").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill5").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill6").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill7").Value)%></td> <td><%=(Recordset1.Fields.Item("Skill8").Value)%></td> <td><%=(Recordset1.Fields.Item("Equipement").Value)%></td> <td><%=(Recordset1.Fields.Item("Runes").Value)%></td> <td><%=(Recordset1.Fields.Item("Type_of_Build").Value)%></td> <td><%=(Recordset1.Fields.Item("Where_Used").Value)%></td> </tr> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Recordset1.MoveNext()Wend%></table><p> </p></body></html><%Recordset1.Close()Set Recordset1 = Nothing%>Now when I run the above and select Spike asd the Type_of_Build and select HA form the Where_Used and submit this here is the output error:Error Type:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)[Microsoft][ODBC Microsoft Access Driver] Wrong number of arguments used with function in query expression 'ISNULL(@Spike, Spike) = Spike AND ISNULL(@HA, HA) = HA'./latest/test.asp, line 34Browser Type:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Page:POST 71 bytes to /latest/test.aspPOST Data:Primary_Profession=NULL&Type_of_build=Spike&Where_Used=HA&Submit=Submit
I am not sure if all the above will be any help to anyone but there it is.
Thanks