5/7/11

How to Select a Field Name From a Access Table & Use It in Query or a Macro

Field names in Access are the headers for the information that you enter into your table. These field names distinguish information stored in the database. You need field names to pull information into a query. Field names are also needed to create macros to find and pull information from your table. Macros automatically carry out tasks based on the criteria and arguments entered into the structure of the macro. The required argument information needed to create a macro differs with every macro. Access generates field boxes to assist you in creating your arguments.
  • New Access Query

    • 1

      Click "Create" on the ribbon to create a new query. Choose "Query Wizard." Select "Simple Query Wizard." Click "OK."

    • 2

      Select the table your field name is stored in from the drop-down box.

    • 3

      Select your field name from the "Available Fields:" box. Click ">" to add the field to your table. Click "Finish."

    Existing Access Query

    • 1

      Right-click your existing query. Select "Design View" from the list of options.

    • 2

      Click the "Field" row in the next blank column in the design grid. Choose your field from the drop-down list.

    • 3

      Click "Run" on the top ribbon. This selects the field name from the table and places it in the query.

    Create Access Macro

    • 1

      Click "Create" on the top ribbon to create a new macro. Click the drop-down box to "Add New Action." Select an action from the list. The "Action Catalog" on the right shows macros available. The "Filter/Query/Search" header shows commands that deal with specific records and table fields.

    • 2

      Complete the argument boxes that appear for the macro. For each macro, Access provides boxes that need to be completed to make the macro run. This information changes with each macro command. For example, the "FindRecord" action needs your field name and search criteria.

    • 3

      Click "Run" on the top ribbon under the "Design" tab. Access prompts you to save the macro. Name the macro and click "OK."

  • No comments: