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 Office Access 2003 opens, it may display a list of the most recently used (MRU) databases on the right side under the Open bar.

 

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, on the main menu of Microsoft Access, you can click File -> New and click Blank Database. This would prompt you to enter the name of the new database.

The shortcut to create a new database is Ctrl + N.

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.

Practical LearningPractical Learning: Creating a Blank Database

  1. To create a new database, press Ctrl + N and click Blank Database
  2. Type Department of Records and Statistics as the name of the database
  3. 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 do this, in the Templates section on the right side, you can click On My Computer...

In the Templates dialog box, you can click the Databases tab and click one of the samples:

After selecting a template, you can click OK. You would be asked to enter a name for the new database. After entering the name, you can click Create. This would start a wizard you can follow.

Practical LearningPractical Learning: Creating a Database Using the Wizard

  1. On the Standard toolbar of Microsoft Access, click the New button
  2. Click On My Computer
  3. In the Templates dialog box, click Databases and double-click Asset Tracking
  4. When asked to provide a name for the database, type Company Expenses
  5. Select your Microsoft Access Database Development folder and display it in the Save In combo box
  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
     
    Database Wizard
  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
     
    Database Wizard
  15. Click Next
  16. Click Finish.
    The wizard will start creating the objects that make up the database
 
 

Previous Copyright © Yevol, 2007 Next