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

Last reviewed: May 27, 1997
Article ID: Q90138
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 97

SYMPTOMS

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

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 may 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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0).

  2. 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
    
    

  3. Create a new form in Design view based on the TestDefaults table.

  4. 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
    
    

  5. Save the form as frmTestDefaults and close it.

  6. Open the form in Form view. Note that WA defaults in the State field of the first record.

  7. Replace WA with CA in the first record, and save the record.

  8. 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.


Keywords : FmsProp kbusage
Version : 1.0 1.10 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.