Results 1 to 3 of 3

Thread: Dropdown boxes

  1. #1
    Bruce Arp Guest

    Dropdown boxes


    When I setup my filter to use dropdown boxes (dbFilterDropFlds), it is showing all values in the table, not unique ones. For example, I have city as one of the fields and it is showing all 5 entires that have Lincoln, not just one Lincoln. Do I need to add another option somewhere? Here is my code(Yes, I am using sample code from one of the web pages):

    Set EmployeeSearch = Server.CreateObject("AspDB.Free&#34
    EmployeeSearch.dbDBType = "SQL"
    EmployeeSearch.dbDSN = "DSN=IntranetData; UID=##; PWD=##"

    EmployeeSearch.dbFilterDropFlds="Center,,Emplo yeeTable,Center; Division,,EmployeeTable,Division"
    EmployeeSearch.dbStartUp="filter"

    FFlds = &#34;LastName,Center,Division,heading=<FONT COLOR=green><B>Enter a Last Name &#34;
    FFlds = FFlds & &#34; such as D* or select a Center such as Lincoln or &#34;
    FFlds = FFlds & &#34;choose a Division, then click the Apply Filter button.</B></FONT><BR><BR>&#34;
    EmployeeSearch.dbFilterFlds = FFlds

    EmployeeSearch.dbQuickProps=&#34;1;;[EmployeeTable];both;4,auto;std&#34;
    EmployeeSearch.dbImageDir=&#34;../images/&#34;
    EmployeeSearch.dbGridDisplayFlds=&#34;FirstName, LastName, WorkTelephone, Division, Center&#34;
    EmployeeSearch.dbNavigationItem=&#34;filter&#34;
    EmployeeSearch.ASPDBFree

    Thanks!

    Bruce

  2. #2
    Mark Guest

    Dropdown boxes (reply)

    Bruce,

    You must add the DISTINCT parameter like this:
    x.dbFilterDropFlds=&#34;Center,,EmployeeTable,Cent er,,,,,DISTINCT;
    See Programming Example BRW-06 at: http://www.aspdb.com/properties

    Mark.

    ------------
    Bruce Arp at 4/17/00 11:59:23 AM


    When I setup my filter to use dropdown boxes (dbFilterDropFlds), it is showing all values in the table, not unique ones. For example, I have city as one of the fields and it is showing all 5 entires that have Lincoln, not just one Lincoln. Do I need to add another option somewhere? Here is my code(Yes, I am using sample code from one of the web pages):

    Set EmployeeSearch = Server.CreateObject(&#34;AspDB.Free&#34
    EmployeeSearch.dbDBType = &#34;SQL&#34;
    EmployeeSearch.dbDSN = &#34;DSN=IntranetData; UID=##; PWD=##&#34;

    EmployeeSearch.dbFilterDropFlds=&#34;Center,,Emplo yeeTable,Center; Division,,EmployeeTable,Division&#34;
    EmployeeSearch.dbStartUp=&#34;filter&#34;

    FFlds = &#34;LastName,Center,Division,heading=<FONT COLOR=green><B>Enter a Last Name &#34;
    FFlds = FFlds & &#34; such as D* or select a Center such as Lincoln or &#34;
    FFlds = FFlds & &#34;choose a Division, then click the Apply Filter button.</B></FONT><BR><BR>&#34;
    EmployeeSearch.dbFilterFlds = FFlds

    EmployeeSearch.dbQuickProps=&#34;1;;[EmployeeTable];both;4,auto;std&#34;
    EmployeeSearch.dbImageDir=&#34;../images/&#34;
    EmployeeSearch.dbGridDisplayFlds=&#34;FirstName, LastName, WorkTelephone, Division, Center&#34;
    EmployeeSearch.dbNavigationItem=&#34;filter&#34;
    EmployeeSearch.ASPDBFree

    Thanks!

    Bruce

  3. #3
    Bruce Arp Guest

    Dropdown boxes (reply)

    Thanks Mark, I found out I had an old copy of the manual, from like Feb 1999 that didn&#39;t include the extra options for this.

    Bruce


    ------------
    Mark at 4/17/00 4:15:44 PM

    Bruce,

    You must add the DISTINCT parameter like this:
    x.dbFilterDropFlds=&#34;Center,,EmployeeTable,Cent er,,,,,DISTINCT;
    See Programming Example BRW-06 at: http://www.aspdb.com/properties

    Mark.

    ------------
    Bruce Arp at 4/17/00 11:59:23 AM


    When I setup my filter to use dropdown boxes (dbFilterDropFlds), it is showing all values in the table, not unique ones. For example, I have city as one of the fields and it is showing all 5 entires that have Lincoln, not just one Lincoln. Do I need to add another option somewhere? Here is my code(Yes, I am using sample code from one of the web pages):

    Set EmployeeSearch = Server.CreateObject(&#34;AspDB.Free&#34
    EmployeeSearch.dbDBType = &#34;SQL&#34;
    EmployeeSearch.dbDSN = &#34;DSN=IntranetData; UID=##; PWD=##&#34;

    EmployeeSearch.dbFilterDropFlds=&#34;Center,,Emplo yeeTable,Center; Division,,EmployeeTable,Division&#34;
    EmployeeSearch.dbStartUp=&#34;filter&#34;

    FFlds = &#34;LastName,Center,Division,heading=<FONT COLOR=green><B>Enter a Last Name &#34;
    FFlds = FFlds & &#34; such as D* or select a Center such as Lincoln or &#34;
    FFlds = FFlds & &#34;choose a Division, then click the Apply Filter button.</B></FONT><BR><BR>&#34;
    EmployeeSearch.dbFilterFlds = FFlds

    EmployeeSearch.dbQuickProps=&#34;1;;[EmployeeTable];both;4,auto;std&#34;
    EmployeeSearch.dbImageDir=&#34;../images/&#34;
    EmployeeSearch.dbGridDisplayFlds=&#34;FirstName, LastName, WorkTelephone, Division, Center&#34;
    EmployeeSearch.dbNavigationItem=&#34;filter&#34;
    EmployeeSearch.ASPDBFree

    Thanks!

    Bruce

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •