Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2007

    Unanswered: Data lookup in web page reports

    I have a table, 'Computers', in which several fields look up their data in other tables. An example: The field 'Owner' in the table 'Computers' is chosen from the table 'Employees'.

    This works fine when I create a report with selected data from the 'Computers'-table. A problem arises, however, when I want to save and display this report as a web page. The data looked up from other tables then appear as numbers in stead of text. Fx. the name in the 'Owner'-field is displayed as the number id of name.

    Is there any way in which I can have the web page version of the report display the name and not the id number?

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    Is the field Owner based on a lookup table in the design for that field in the main table? It's possible that the Owner field was setup in the main table to be based off of a lookup table to the Owner's name. This often is problematic as when you look at that field in viewing the records, you see the Owner's name when the "actual" underlying value in the field is the ID value (one reason I avoid establishing a Lookup on a field in the table design itself - these kind of lookups should be saved for comboboxes on the form.)

    For your report and it's underlying query for the recordsource, link in the Owner's table and add the Owner's name from the lookup table and use this Owner's name field in your report verses the field in the main table.
    Last edited by pkstormy; 10-04-07 at 11:37.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Sep 2007
    Firstly: Thank you very much for your advice!
    Secondly: Yes, the field Owner is "based on a lookup table in the design for that field in the main table."
    Thirdly: I think I see what you want me to do but am not quite sure as to how to do it, precisely.

    When I try to add the table Employees to the query in order to get the Owner name from there in stead of the lookup I get a JOIN problem, whatever that is... Any hints as to how your fine plan is realized?

  4. #4
    Join Date
    Sep 2007
    I have played the google game and found microsoft's own description of the problem:

    My problem seems to be caused by the fact that the browser does not know how to execute the DLookup() function. The Microsoft support team gives the following solution:
    Using Existing Relationships to Look up Data
    1. Open the sample database Northwind.mdb or the sample Microsoft Access project NorthwindCS.adp.
    2. In the Database window, click Pages under Objects, and then click New.
    3. In the New Data Access Page box, click AutoPage: Columnar, click Orders in the Choose the table or query (or view) where the object's data comes from box, and then click OK.
    4. After the page is created, on the View menu, click Design View.
    5. On the View menu, click Field List.
    6. Click the plus signs (+) next to Tables until you see a tree structure like the following, and then drag the CompanyName field to the page: Tables
    Related Tables

    7. On the File menu, click Save, and save the page as dapOrdersRel.htm.
    8. On the View menu, click Page View. Note that as you browse through the orders, the appropriate Company Name appears for each current CustomerID.
    I am, however, sadly incapable of implementing this solution in my existing Data Access Page. Any hints?

Posting Permissions

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