Microsoft KB Archive/96420

= ACC: Objects Cannot Be User-Defined Data Type Elements =

Article ID: 96420

Article Last Modified on 5/9/2003

-

APPLIES TO


 * Microsoft Access 1.0 Standard Edition
 * Microsoft Access 1.1 Standard Edition
 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q96420



SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.

When you attempt to use a Microsoft Access defined object data type as a user-defined data type element, you may receive the following error message:

Expected: Integer or Long or Single or Double or Currency or String or Variant or Identifier.



CAUSE
Objects predefined by Microsoft Access are not supported as user-defined data type elements.



STATUS
This behavior no longer occurs in Microsoft Access version 7.0.



MORE INFORMATION
Microsoft Access defines eight object data types: Control, Database, Dynaset, Form, QueryDef, Report, Snapshot, and Table. You can use the Type statement in the Declarations section of a module to define your own data type. The user-defined data type cannot be one of the eight predefined data types.

Steps to Reproduce Behavior
 Create a new module.  In the Declarations section, attempt to define a structure as follows:

     Type ControlInfo Ctl as Control End Type  From the Run menu, choose Compile All. Note that you receive the error message mentioned earlier in this article.

