Microsoft KB Archive/90138

= ACC: Pressing CTRL+ALT+SPACEBAR Enters Control's Default Value =

Article ID: 90138

Article Last Modified on 5/28/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 Q90138



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
When you create a form based on a table that has one or more fields defined with the DefaultValue property, pressing CTRL+ALT+SPACEBAR inserts the control's default value defined in the form rather than the field's default value defined in the table. If no value has been defined for the control's DefaultValue property, then CTRL+ALT+SPACEBAR has no effect.

When you are entering data in the table's Datasheet view, pressing CTRL+ALT+SPACEBAR inserts the field's default value, as defined in the table.



CAUSE
When you create a form based on a table with one or more fields defined with the DefaultValue property, new controls bound to such fields will have the same DefaultValue property. You can keep this value, change it, or delete it.

When you enter new records in Form view, any control that has a DefaultValue property will be displayed with the control's default value. If you decide that you want to have the default value that was defined in the table, you will have to type it in. In Form view, when you press CTRL+ALT+SPACEBAR, the default value defined for the control is entered.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0).  Create and save the following new table called TestDefaults:

     Table: TestDefaults ---     Field Name: City Data Type: Text Field Name: State Data Type: Text DefaultValue: NC                        Create a new form in Design view based on the TestDefaults table.  Add the following text box controls to the detail section of the form:

     Text Box: Name: txtCity ControlSource: City Text Box: Name: txtState ControlSource: State DefaultValue: WA                       </li> Save the form as frmTestDefaults and close it.</li> Open the form in Form view. Note that WA defaults in the State field of the first record.</li> Replace WA with CA in the first record, and save the record.</li> Delete CA in the State field, and then press CTRL+ALT+SPACEBAR. Note that the form's default value, WA, appears in the State field.</li></ol>

Additional query words: default keystroke

Keywords: kbprb kbusage KB90138

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.