Friday, 24 July 2009

Access 2010 - Database II

Creating a new table

Regardless of what experience you have using Access 2010 or earlier versions there are certain concepts to a database that you need to understand though it must be said that the levels to which you can take that understanding are endless.

When we open Access 2010 the program starts on the Office Button New tab with ‘Blank Database’ selected. Click ‘Create’. Access creates a new database (Table1 : Table) listed in the Navigation Pane on the left. In the main window is the Datasheet.

The Datasheet is not a database object though it is one of the numerous ways of viewing the data contained within the database, for now it is empty and ready for data to be added.

Fields, Records & Values

The data, when added, is displayed in rows and columns much as you would see data in an Excel spreadsheet. The column headings are called ‘Fields’ and the contents of the rows ‘Records’. A row in a database is a single Record consisting of different Fields.

A Field has many properties that can define the specific types of data contained within it, or which can and can’t be added to it. If for example you have a Field called ‘Year’ and its properties have been set to only accept numeric data then it will not accept words, letters or symbols.

The Value is the actual data where the Record meets Field. For example under the Field ‘Year’ on the first Record the Value could be ‘2009’ and, although there will be many instances of 2009, this Value is specific to this Record.

Naming Names

Whilst a database is small in size the names of objects might not seem to have much importance but once it starts to grow it will have. It is important to determine a convention for naming objects in a database even the tables themselves. If you create Reports, Forms, Queries, Etc. Based on a table, changing the name of the table will break the link between the table and the objects that use its information.

Tables and Queries share the same namespace within a database accordingly they need to have different names. Tables, Forms, Macros and Reports may share the same name. My own preference is to precede the name of an object with a shortened description, underscore and its name:

  • tbl_Name
  • qry_Name
  • rpt_Name
  • frm_Name
  • mcr_Name
  • mod_Name

It is always a good idea to give both Fields and Objects clear and descriptive names when you create them, regardless of the fact that most work done using Access 2010 or any other version is usually done on an existing database. The point being that, although AutoCorrect will accept changes, it will not update the name changes in the properties nor in any VBA code or Macros.


Post a Comment