Thursday, July 8, 2010

Microsoft Access Basics

If I had to strip down an Access database into its key components, it would be tables, forms, queries and reports. You could get by without getting involved in more complicated features such as macros and VBA code.


A table is the most important component of a database. Without it there would be no data. A table is used to hold any information entered. You can enter information directly into a table or build a better looking screen by using a form. A table will contain columns such as first name, surname, address etc.


Building a table is only half the story though. You still need to relate the tables together in some way and knowledge of relational table design is good to have. You can get by without relating tables, but it is better to create these relationships. Think of it this way-would you want to have an order that is not connected to a customer? What about an employee that was not tied to a department or a social security number? Relational theory is definitely an important part of Microsoft Access basics. It is not hard to learn and will give you a good grounding for further database development.


Once you have the tables and relationships between them you can start to put together the input screens, known in MS Access as forms. Just like tables, MS Access has in build wizards to take you step by step through the creation process. Screens can be used to either display or enter data into the tables. You can add color to the screens and also add on what are known as controls. The controls will be bound to the table column. For example your form could contain an input text box for a surname or first name. When you run the form and type in the data, it automatically is saved to the table that is the record source of the form.


Now that the tables and forms are built it is time to look at how to get information out of the database. One way is to use what are known as MS Access queries. A query will ask a question and give you the answer. For example you might want to say give me all sales in Tokyo this month. In the query designer you would add tables to extract the data from and type in the criteria. You can also bind a query to a form as its record source.


Reports will allow you to present your information in a printable format. Creating a report is similar to creating a form. Both have wizards to guide you through the process. It is possible to customize a report in report design view.


Beyond these Microsoft Access basics there are VBA code modules and macros to become familiar with. This really is only worth investigating when you want more control over what your database can do.

No comments:

Post a Comment