Home

Introduction to Microsoft Access and VBA

 

Database Creation

 

Introduction

Microsoft Access can certainly be used to create stand-alone applications. The reality is that Microsoft Access is not a regular programming environment like Microsoft Visual Basic. MS Access is a database environment and its primary purpose is to help you create computer databases. There are various techniques you can use but the simplest consists of using (only) Microsoft Access.

To create and manage a database using Microsoft Access, you must open it. When Microsoft Access comes up, to create a database, you can click Create A New File:

Starting a New Database

An alternative is to click File -> New... on the main menu or to click the New button on the Standard toolbar.

As you might be aware, the primary purpose of using Microsoft Access is to create a computer database. There are different approaches to do this.

Blank Database Creation

A database is referred to as empty or blank when it doesn't contain any object such as a form, etc. To create an empty database that doesn't have objects, after clicking Create A New File or File -> New from the main menu, under New in the right section, you can click Blank Database:

Creating a Blank Database

As an alternative, under Templates, you can click On My Computer. This would display the Templates dialog box where, the General tab, you would click the Blank Database button and click OK

The Name of, and Path to, a Database

The name of the database follows the rules of files of Microsoft Windows. For example, the name can be made of letters, digits, spaces, and other allowed characters, up to 255 of them. After specifying the name, you should pay attention to the path. The path is the location, in your computer or your network, where the database as a file would be found. By default, the File New Database dialog box selects the My Documents folder for a new database. In most cases, this would be enough:

Otherwise, to specify a folder from the local computer, you can click the arrow of the Save In combo box, select a drive such as (A:), (C:), or another available drive:

After selecting the drive, you can either select an existing folder or create a new folder by clicking the Create New Folder button on the right side of the Save In combo box.

You can also use a directory on the network as the repository of the new database. To specify a network folder, if your computer is part of a network, you can click the arrow of the Save In combo box, and select Network Neighborhood or My Network Places:

From Network Neighborhood or My Network Places, select an existing directory or navigate the network until you reach the desired folder. In some cases, you might need to contact your IT department for the right directory to use.

After specifying a drive and a folder, you can click Create.

If you had already opened Microsoft Access, to create a new database, on the toolbar, you can click the New button. As an alternative, on the main menu, you can click File -> New... The shortcut to this is Ctrl + N. This action would display the New dialog box and would select the Database icon from the General property page. You can then click OK. Once again, you would be asked to provide a name for the database and its location.

Practical LearningPractical Learning: Creating a Blank Database

  1. To create a new database, on the Standard toolbar, click the New button
  2. On the right side, under Templates, click On My Computer
  3. In the General property page, make sure Blank Database is selected and click OK
     
  4. Type Department of Records and Statistics as the name of the database
  5. Click the arrow of the Save In combo box and select the (C:) drive if you can. On the right side of the Save In combo box, click the Create New Folder button
  6. Type Microsoft Access Database Development as the name of the new folder and press Enter. This should display the new folder in the Save In combo box. If it didn't, double-click the new folder
     
  7. Click Create

A Database From a Template

If you create a blank database, eventually, you would have to add the necessary objects for the project. Instead of starting from scratch, you can use one of the sample databases that ship with Microsoft Access.

To use one of the templates that ship with Microsoft Access, on the main menu, you can click File -> New... On the right side, under Templates, click On My Computer. When the Templates dialog box comes up, you can click the Databases tab and select one sample from the list:

This allows you to select one of the templates and click OK. Once again, you would be required to provide a name for a database and a path.

Practical LearningPractical Learning: Creating a Database Using the Wizard

  1. On the Standard toolbar of Microsoft Access, click the New button
  2. On the right side, click On My Computer
  3. In the New dialog box, click the Databases property page
  4. Click Expenses and click OK
  5. When asked to provide a name for the database, type Company Expenses
  6. Click Create
  7. In the first page of the wizard, click Next
  8. In the Tables in the Database list, make sure Information About Employees is selected. In the Fields in the Table list, click the check boxes of Department Name, Email Name, Home Phone, and Date Hired
     
  9. In the Tables in the Database list, click Expense Report Information
  10. In the Fields in the Table list, click the check box of Business Purpose
  11. Click Next
  12. In the second page of the wizard, click Standard and click Next
  13. In the third page of the wizard, click Formal and click Next
  14. In the fourth page of the wizard, change the Title of the Database to be DREST Staff Expenses
     
  15. Click Next
  16. Click Finish.
    The wizard will start creating the objects that make up the database
 

Previous Copyright © 2005-2012, FunctionX, Inc. Next