Microsoft KB Archive/283208

= ACC2000: &quot;The Constant You Entered for the Control Type Is Invalid&quot; Error When You Add a Drop-down List Box to a Form or a Report =

Article ID: 283208

Article Last Modified on 12/12/2002

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q283208



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 click the drop-down list box control in the toolbox in a form or a report, you receive the following error message:

The constant you entered for the control type is invalid. For a list of valid constants you can use to create a control, click Help.

The error message has an OK button and a Help button. If you click the OK button, the error message is displayed again, and you are unable to close the error message. Your only option is to use CTL+ALT+DEL to quit Microsoft Access.



CAUSE
You have customized the form or report toolbox to include the drop-down list box control, which is not a control available for use on a form or a report.

The combo box and the list box are the valid objects of this type available for a form or report object. The drop-down list box control is designed for use on data access pages.

If you try to use the drop-down list box on a form or a report, you will receive the error message listed in the &quot;Symptoms&quot; section of this article.



RESOLUTION
Use a combo box or list box control for forms or reports. Use the drop-down list box control only on data access pages.



Steps to Reproduce the Behavior

 * 1) Open the sample database Northwind.mdb.
 * 2) In the Database window, open the Employees form in Design view.
 * 3) If the toolbox is not displayed, click Toolbox on the View menu.
 * 4) Right-click in the toolbox, and then click Customize on the shortcut menu.
 * 5) Click the Commands tab, and then click Toolbox under Categories.
 * 6) Scroll through the list of available commands of the Toolbox category, and then click Dropdown List.
 * 7) Drag the drop-down list box control to the toolbox.
 * 8) In the Customize dialog box, click Close.
 * 9) In Design View of the Employees form, click the drop-down list box control in the toolbox. Note that you receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.

