ACC97: Uninitialized String in FollowHyperlink Method Causes Err

Last reviewed: August 29, 1997
Article ID: Q165191
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you use the FollowHyperlink method of the Application object, you receive one of the following error messages:

   Run-time error '28':
   Out of stack space

   -or-

   MSACCESS caused an invalid page fault in module KERNEL32.DLL

   -or-

   MSACCESS caused an invalid page fault in module MSACCESS.EXE

The latter two error messages cause Microsoft Access to shut down.

This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to the "Building Applications with Microsoft Access 97" manual.

CAUSE

You may be using an uninitialized string variable in the Address argument of the FollowHyperlink method.

RESOLUTION

Write your procedure to initialize the string variable, or check its value before you call the FollowHyperlink method.

The following code sample initializes the string variable to an empty string initially, which prevents an error if the variable is not reset elsewhere in the procedure:

   Sub NoCrash()
      Dim st As String
      st = ""
      ' More code goes here that should ultimately
      ' reset the st variable to a valid hyperlink
      ' address.
      Application.FollowHyperlink st
   End Sub

The next sample procedure checks the value of the string variable before passing it to the FollowHyperlink method:

   Sub OpenWebPage()
      Dim st As String
      ' More code goes here that should set the
      ' st variable to a valid hyperlink
      ' address.
      If st = "" Then
         Msgbox "You must set the st variable to a valid string."
      Else
         Application.FollowHyperlink st
      End If
   End Sub

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

WARNING: Following these steps will cause a page fault on your computer. Make sure you save and close any open work on your computer before following these steps.

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

  2. Create a new module and type the following procedure:

          Sub CrashMe()
             Dim st As String
             Application.FollowHyperlink st
          End Sub
    
    

  3. To test this procedure, type the following line in the Debug window, and then press ENTER.

           CrashMe
    

    Note that you receive one of the errors listed at the beginning of this article.

REFERENCES

For more information about the FollowHyperlink method, search the Help Index for "FollowHyperlink method."


Additional query words: Internet intranet gpf null
Keywords : kberrmsg kbusage SynFnc IntLink
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbbug
Solution Type : kbcode


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: August 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.