ACC2000: Invalid Length for Fixed-Length String - Exceeds 64-KB Limit (210172)
The information in this article applies to:
This article was previously published under Q210172 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you declare a fixed-length string variable that is larger than 65,535 bytes, the following message appears:
Compile error:
Invalid length for fixed-length string
CAUSE
Variables in Microsoft Access 2000 are limited to approximately 64 KB per fixed-length string, regardless of whether the variables are local or global. The error message appears if a fixed-length string exceeds that limit.
This is not a cumulative total. In other words, variable X and variable Y can each be approximately 64 KB in size. The exact maximum length of a fixed-length string in Microsoft Access 2000 is 65,535 bytes.
RESOLUTION
Do not declare fixed-length strings longer than 65,535 bytes.
REFERENCESFor more information about the String data type, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type string data type in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kberrmsg kbprb kbprogramming KB210172 |
---|
|