Saturday, March 5, 2022

Microsoft Access : Create a select query by using the Simple Query wizard and Design View


How to Create tab in Microsoft Access includes two commands in its Queries group:

  1. Query Wizard
  2. Query Design

To run a query :

  1. In the Navigation pane, double-click the query.
  2. In Design view, click Runon the Query Tools Design tool tab.

To save a query :

  1. On the Quick Access Toolbar, click Save.
  2. In the Save As dialog box, enter a name for the query, and then click OK.

To delete a query :

    In the Navigation pane, right-click the query, and then click Delete.

To create a select query by using the Simple Query wizard :

Microsoft Access : How to change a field caption, field size, set the default value and update for a field


How to change a field caption :

In Datasheet view, click Name & Caption in the Properties group (on the Table Tools Fields tool tab). In Design view, enter the caption in the Caption property box..

How to change the field size :

In Datasheet view, use the Field Size box in the Properties group (on the Table Tools Fields tool tab) to specify the field size for a text field. In Design view, select the field size setting for a Number field; enter the value for a text field.

How to set the default value for a field :

In Datasheet view, click Default Value in the properties group to open the Expression Builder. In Design view, you can enter the default value, or click the ellipsis button (…) in the Default Value property box to open the Expression

Builder and enter the value or expression there

How to add a field validation rule and specify an input mask


How  to add a field validation rule :

  1. Open the table in Datasheet view.
  2. On the Table Tools Fields tool tab, click Validation, Field Validation Rule.
  3. In the Expression Builder, enter the expression that defines the rule, and then click OK.
  4. On the Fields tool tab, click Validation, Field Validation Message.
  5. In the Enter Validation Message dialog box, enter the message that Access displays if users enter invalid data.

How to specify an input mask :

  1. Open a table in Design view.
  2. Select the field you want to work with.
  3. In the Input Mask property box, click the ellipsis to run the Input Mask wizard.
  4. Select the mask you want to use, or click Edit List to modify a built-in mask or create one of your own.