Microsoft KB Archive/105647
ACC1x: GP Fault When Passing User-Defined Type with Array
The information in this article applies to:
- Microsoft Access versions 1.0, 1.1
You get the error message "MSACCESS caused a General Protection Fault (GP Fault) in module MSABC110.DLL at 000D:1AD4" when you attempt to pass a user-defined type to a function or Sub procedure in which one of the components of the user-defined type is an array.
This happens only under the following conditions:
- The user-defined type contains an array.
- You attempt to pass an array element of the user-defined type to a Sub procedure or function.
A workaround for Microsoft Access version 1.1 is to explicitly cast the data type of the array. For the example below, instead of
you would explicitly cast the array as a string array by placing the "$" character at the end of the array reference, such as:
Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.
Steps to Reproduce Problem
- Start Microsoft Access and create a new database and module.
In the Declarations section of the module, type the following:
Type TestType StrArry(10) as String End Type Dim Testing as TestType
Create a Sub procedure called Start as follows:
Sub Start() Testing.StrArry(1) = "" Call GPFTest(Testing.StrArry()) End Sub
Create a Sub procedure called GPFTest as follows:
Sub GPFTest(Testing() as String) For x=1 to 10 Debug.Print Testing(x) ' This line causes a GP Fault. Next End Sub
Start the code by running the Sub Start() function. To do this, give the focus to the Immediate window, type "Start," and press ENTER.
You get the following error message:
MSACCESS caused a General Protection Fault in module
MSABC110.DLL at 000D:1AD4
Additional query words: Programming GPF
Keywords : kberrmsg kbprg
Issue type : kbbug
Last Reviewed: November 4, 2000