ACC97: Uninitialized String in FollowHyperlink Method Causes ErrLast reviewed: August 29, 1997Article ID: Q165191 |
The information in this article applies to:
SYMPTOMSModerate: 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.EXEThe 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.
CAUSEYou may be using an uninitialized string variable in the Address argument of the FollowHyperlink method.
RESOLUTIONWrite 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 SubThe 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 STATUSMicrosoft 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 INFORMATIONSteps 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.
REFERENCESFor more information about the FollowHyperlink method, search the Help Index for "FollowHyperlink method."
|
Additional query words: Internet intranet gpf null
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |