Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

MS Access object


May 16, 2021 MS Access


Table of contents


MS Access uses Objects to help users list and organize information and prepare specially designed reports. When you create a database, Access provides tables, queries, forms, reports, macros, and modules. The database in Access consists of many objects, but here are the main objects -

  • Table
  • Inquire
  • Form
  • Report

In summary, these objects allow you to enter, store, analyze, and compile data. B elow is a summary of the main objects in the Access database.

Table

A table is an object that defines and stores data. When you create a new table, Access requires you to define a field that is also known as a column title.

  • Each field must have a unique name and data type.

  • A table contains fields or columns that store different types of data, such as names or addresses, and records or rows that collect all information about a specific instance of a topic, such as all information about a customer or employee.

  • You can define primary keys, one or more fields with unique values for each record, and one or more indexes on each table to help retrieve your data faster.

Inquire

An object that provides a custom view of data from one or more tables. 20>

  • Running a query is like querying a database for detailed problems.

  • When you build a query in Access, you define specific search criteria to find exactly what data you need.

  • In Access, you can use the graphical queries of the sample tool, or you can write structured query language (SQL) statements to create queries.

  • You can define a query as selecting, updating, inserting, or deleting data.

  • You can also define queries that create new tables from data in one or more existing tables.

Form

A form is an object in a desktop database that is primarily used for data entry or for displaying or controlling application execution. on.

  • Forms are used to enter, modify, and view records.

  • Forms are often used because they are an easy way to guide people into data correctly.

  • When you enter information in a form in Access, the data is exactly where the database designer wants it to enter one or more related tables.

Report

A report is an object in a desktop database that formats, calculates, prints, and summarizes selected data.

  • You can view the report on the screen before you print it.

  • If the form is used for input purposes, the report is used for output.

  • Anything you plan to print is worth a report, whether it's a list of names and addresses, a financial summary of the period, or a set of mail labels.

  • Reports are useful because they allow you to render the components of a database in an easy-to-read format.

  • You can even customize the appearance of your report to make it visually appealing.

  • Access allows you to create reports from any table or query.

Other MS Access objects

Let's take a look at other MS Access objects now.

Macro

This object is a structured definition of one or more operations that you want Access to perform in response to defined events. b20> Access macros are scripts that are used to perform a job. /b50> For example, to create a button to open a report, you can use a macro to trigger an OpenReport operation.

  • You can include simple conditions in a macro to specify when one or more actions in the macro should be performed or skipped.

  • You can use macros to open and execute queries, open tables, or print or view reports.

  • You can also run other macros or Visual Basic procedures from macros.

  • Data macros can be attached directly to table events, such as inserting new records, editing existing records, or deleting records.

  • A data macro in a Web application can also be a stand-alone object that can be called from other data macros or macro objects.

Module

A module is an object in a desktop database that contains custom procedures that you write with Visual Basic. The module provides more discrete flow of operations and allows you to catch errors.

  • Everything you can do in a macro can also be done in a module, but you don't get a macro interface that indicates what each action requires.

  • Modules are more powerful, which is important if you plan to write code for a multi-user environment, because macros cannot contain error handling.

  • A module can be a stand-alone object that contains functions that can be called anywhere in the application, or it can be associated directly with a form or report in response to events on a related form or report.