Results 1 to 3 of 3

Thread: dbDisplayLookupList

  1. #1
    Ron Schechtman Guest

    dbDisplayLookupList

    I have a form that I just display the detail of a query. I am trying to use a numeric value from the select statement in the dbDisplayLookupList to display the actual name from another table. All I ever get is the value and not the name the value represents. The value is OfficNum. I always display the OfficeNum and not the OfficeName.

    X.dbDisplayLookUpList = "(~|+)Category||SELECT DISTINCT OfficeNum ,OfficeName FROM [Office]"

  2. #2
    John Guest

    dbDisplayLookupList (reply)


    Hi Ron,

    Seems like your code is right? Here's my sample dbDisplayLookupList sample that works with the Nwind database. Here's the code followed by the output. Try it yourself and change the fields/tablename to match yours.

    John

    <%
    Set X= Server.CreateObject(&#34;Asp.DB&#34
    X.dbUnit = 1
    X.dbMode=&#34;grid&#34;
    X.dbDSN = &#34;NWIND&#34;
    X.dbSQL = &#34;SELECT EmployeeID, ReportsTo from employees&#34;
    X.dbDisplayLookUpList = &#34;(;|)ReportsTo||SELECT EmployeeID, Lastname as Name FROM Employees;&#34;
    X.dbBlankText=&#34;N/A&#34;
    X.ASPdb
    %>


    EmployeeID ReportsTo
    1 Fuller
    2 N/A
    3 Fuller
    4 Fuller
    5 Fuller
    6 Buchanan
    7 Buchanan
    8 Fuller
    9 Buchanan
    10 N/A



    Top Prev Next Bottom Row+ Row- Reload

    [1 - 10 : 11]

    ------------
    Ron Schechtman at 9/12/01 6:38:31 PM

    I have a form that I just display the detail of a query. I am trying to use a numeric value from the select statement in the dbDisplayLookupList to display the actual name from another table. All I ever get is the value and not the name the value represents. The value is OfficNum. I always display the OfficeNum and not the OfficeName.

    X.dbDisplayLookUpList = &#34;(~|+)Category||SELECT DISTINCT OfficeNum ,OfficeName FROM [Office]&#34;

  3. #3
    Frank Kwong Guest

    dbDisplayLookupList (reply)

    use the designer to generate the code....


    ------------
    John at 9/13/01 12:24:32 AM


    Hi Ron,

    Seems like your code is right? Here&#39;s my sample dbDisplayLookupList sample that works with the Nwind database. Here&#39;s the code followed by the output. Try it yourself and change the fields/tablename to match yours.

    John

    <%
    Set X= Server.CreateObject(&#34;Asp.DB&#34
    X.dbUnit = 1
    X.dbMode=&#34;grid&#34;
    X.dbDSN = &#34;NWIND&#34;
    X.dbSQL = &#34;SELECT EmployeeID, ReportsTo from employees&#34;
    X.dbDisplayLookUpList = &#34;(;|)ReportsTo||SELECT EmployeeID, Lastname as Name FROM Employees;&#34;
    X.dbBlankText=&#34;N/A&#34;
    X.ASPdb
    %>


    EmployeeID ReportsTo
    1 Fuller
    2 N/A
    3 Fuller
    4 Fuller
    5 Fuller
    6 Buchanan
    7 Buchanan
    8 Fuller
    9 Buchanan
    10 N/A



    Top Prev Next Bottom Row+ Row- Reload

    [1 - 10 : 11]

    ------------
    Ron Schechtman at 9/12/01 6:38:31 PM

    I have a form that I just display the detail of a query. I am trying to use a numeric value from the select statement in the dbDisplayLookupList to display the actual name from another table. All I ever get is the value and not the name the value represents. The value is OfficNum. I always display the OfficeNum and not the OfficeName.

    X.dbDisplayLookUpList = &#34;(~|+)Category||SELECT DISTINCT OfficeNum ,OfficeName FROM [Office]&#34;

Posting Permissions

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