ACC1x: GP Fault When Passing User-Defined Type with ArrayID: Q105647
|
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:
A workaround for Microsoft Access version 1.1 is to explicitly cast
the data type of the array. For the example below, instead of
Call GPFTest(Testing.StrArry())
Call GPFTest(Testing.StrArry$())
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.
Type TestType
StrArry(10) as String
End Type
Dim Testing as TestType
Sub Start()
Testing.StrArry(1) = ""
Call GPFTest(Testing.StrArry())
End Sub
Sub GPFTest(Testing() as String)
For x=1 to 10
Debug.Print Testing(x) ' This line causes a GP Fault.
Next
End Sub
MSACCESS caused a General Protection Fault in module
MSABC110.DLL at 000D:1AD4
Additional query words: Programming GPF
Keywords : kberrmsg kbprg
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: March 26, 1999