ACC97: Can't Follow Hyperlinks in Totals Query

Last reviewed: April 1, 1997
Article ID: Q164984
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you create a totals query that uses the SQL aggregate functions First() or Last() on a Hyperlink field, the query results do not display a usable Hyperlink field. Instead you see the Displaytext, Address, and Subaddress portions of the hyperlink displayed as text.

RESOLUTION

If you want to use a Hyperlink field in a totals query, append the query results to an existing table that contains a Hyperlink field. Then you can open the table directly or create a select query based on the table in order to view the results and still maintain the ability to follow the hyperlinks.

The following example illustrates how to do this using the Suppliers table in the sample database Northwind.mdb.

  1. Start Microsoft Access and open the sample database Northwind.mdb.

  2. Create the following table named Suppliers2 in Design view:

          Table: Suppliers2
          -----------------------
          Field Name: Region
    
             Data Type: Text
          Field Name: HomePage
             Data Type: Hyperlink
    
    

  3. Save the Suppliers2 table and close it. You do not need to create a primary key.

  4. Create a new query in Design view based on the Suppliers table:

          Query: HomePageQuery
          --------------------
          Type: Select Query
    

          Field: Region
    
             Table: Suppliers
          Field: HomePage
             Table: Suppliers
    
    

  5. On the View menu, click Totals to create a totals query.

  6. In the QBE grid, select Group By in the Total row for the Region column; select First in the Total row for the HomePage column.

  7. On the Query menu, click Run. Note that the FirstOfHomePage column does not contain usable hyperlinks.

  8. On the View menu, click Design View.

  9. On the Query menu, click Append Query.

  10. In the Append dialog box, select Suppliers2 in the Table Name box, and

        then click OK.
    

  11. In the QBE grid, select Region in the Append To row of the Region

        column; select HomePage in the Append To row of the HomePage column.
    

  12. On the Query menu, click Run. Click Yes when prompted if you want to

        append the selected rows.
    

  13. Close the query without saving it, and open the Suppliers2 table. Note

        that the table contains the results of your query, including usable
        hyperlinks.
    

MORE INFORMATION

When you create a totals query that uses the First() or Last() function on a Hyperlink field, Microsoft Access displays the text equivalent of the Hyperlink field. The text of the field consists of three sections separated by number signs (#): the Displaytext, the Address, and the Subaddress.

REFERENCES

For more information about the different parts of a Hyperlink field, search the Help Index for "hyperlinks, returning hyperlink information," or ask the Microsoft Access 97 Office Assistant.


Additional query words: internet intranet sum
Keywords : kbusage QryTotal
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.