ACC: Pressing CTRL+ALT+SPACEBAR Enters Control's Default Value
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 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.
MORE INFORMATION
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
- Save the form as frmTestDefaults and close it.
- Open the form in Form view. Note that WA defaults in the State field of
the first record.
- Replace WA with CA in the first record, and save the record.
- 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.
Additional query words:
default keystroke
Keywords : kbusage FmsProp
Version : 1.0 1.10 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb