How to Make a Database Using MS Access
Create a blank database., Choose a blank database since you will be building it from scratch. , Table 1 will appear on the screen., Enter details for the first two fictional employees., You need to alter the design at this point, because it does not...
Step-by-Step Guide
-
Step 1: Create a blank database.
First, launch Access and choose File> New. -
Step 2: Choose a blank database since you will be building it from scratch.
, Click on "Click to Add". , Type Mary, press Enter to move to the next column, and type Smith.
Press Enter twice to move to the second column of the second row, and type Peter, press Enter,and finally type Johnson. , To make these changes, click the View drop-down menu on the Home tab of the Ribbon toolbar, and select Design View. ,,,,,,,,,, To create a second table in which to store information about the electronic devices your employees are using, select the Create tab on the Ribbon toolbar, and click Table. , Type iPhone, and press Enter twice. ("T23" and "iPhone" are just examples.
You can use whatever number scheme makes sense for your business.) , Click the View drop-down menu on the Ribbon toolbar, and click Design View. ,,,,, You’ll need to change that setting so that you can enter the same employee number multiple times if that employee has several devices checked out. ,, When prompted, click Yes to save the table.
Type 2011 as the employee number for the first electronics item in the list.
Then just continue or you can follow the image below. , Now that you've set up the table design, you can enter data into the table. ,,,,, Select the Enforce Referential Integrity checkbox, and click Create. , This line describes a one-to-many link:
One employee can have many devices, but each device can be allocated to only one employee. , Now that the two tables are linked, you can create a form that will make it easy to add employees and devices.,,,,, prompt, click by Employees, choose Form with subform(s), and then click Next. ,,, Here too is a 'New (Blank) Record' button that you can click to add a new employee.When you add a new electronics item, Access will associate it with the current employee automatically. -
Step 3: Table 1 will appear on the screen.
-
Step 4: Enter details for the first two fictional employees.
-
Step 5: You need to alter the design at this point
-
Step 6: because it does not have any table headers
-
Step 7: so that you can use employee ID numbers.
-
Step 8: Type Employees as the table name when the Save As box as the table name appears (in the tab beneath the menu bar) and click OK.
-
Step 9: Once you've typed some data
-
Step 10: you can fine-tune the design by moving to Design View.
-
Step 11: Once in Design View mode
-
Step 12: type EmployeeNumber in place of the 'ID' field name.
-
Step 13: Press the Tab key
-
Step 14: and in the Data Type drop-down list
-
Step 15: choose Number.
-
Step 16: Change 'Field1' to read FirstName and 'Field2' to read LastName.
-
Step 17: Return to Datasheet View by clicking View
-
Step 18: Datasheet View.
-
Step 19: Click Yes when prompted to save the table.
-
Step 20: Type the numbers 2011 and 2012 in the first column of the table.
-
Step 21: Once the table is complete
-
Step 22: save it by right-clicking the Employees tab and clicking Save.
-
Step 23: Create a Table to Contain Item Information.
-
Step 24: Click on "Click to Add"
-
Step 25: type T23
-
Step 26: and press Enter.
-
Step 27: Each item must be allocated to the employee who is in possession of it.
-
Step 28: Type the table name Electronics
-
Step 29: and click OK.
-
Step 30: In the Design View
-
Step 31: type EmployeeNumber in place of the field name 'ID'.
-
Step 32: Press the Tab key; in the Data Type drop-down menu
-
Step 33: choose Number.
-
Step 34: Type IDcode in place of 'Field1' and Description in place of 'Field2'.
-
Step 35: Currently the EmployeeNumber field is set to be a "primary key" field
-
Step 36: which prevents you from entering duplicate data in that field.
-
Step 37: Click anywhere in the EmployeeNumber field in the table
-
Step 38: and click the Primary Key button on the Ribbon toolbar to remove the Primary Key setting from this field.
-
Step 39: Return to Datasheet View by clicking View
-
Step 40: Datasheet View on the Ribbon toolbar.
-
Step 41: Establish a Relationship Between the Tables.
-
Step 42: save and close each table by right-clicking each table's tab and choosing Close (click Yes if prompted).
-
Step 43: select the Database Tools tab on the Ribbon toolbar
-
Step 44: and click the Relationships button.
-
Step 45: When the Show Table dialog box appears
-
Step 46: click on each table name in turn
-
Step 47: click Add
-
Step 48: and then click Close.
-
Step 49: Drag the EmployeeNumber field from the Employees box
-
Step 50: and drop it on top of the Employee Number in the Electronics box.Â
-
Step 51: The Edit Relationships dialog box will open when you do this.
-
Step 52: The Relationships tool allows you to create the link between the two data tables.You should now see a line between the two tables
-
Step 53: with a 1 on the Employees side and the infinity symbol on the Electronics side.
-
Step 54: Create a Form to Enter and View Data.
-
Step 55: On the Ribbon toolbar
-
Step 56: click Create
-
Step 57: Form Wizard.
-
Step 58: When the Form Wizard dialog box appears
-
Step 59: select Table: Employee from the Tables/Queries menu
-
Step 60: and click the double-arrow button to add all the fields to the Selected Fields list.
-
Step 61: in the Table/Queries menu
-
Step 62: click the Table: Electronics entry
-
Step 63: click IDcode
-
Step 64: and click the single arrow.
-
Step 65: Finally
-
Step 66: click Description
-
Step 67: click the single arrow
-
Step 68: and then click Next.
-
Step 69: When you see the 'How do you want to view your data?'
-
Step 70: click Datasheet
-
Step 71: and Finish to name the forms with the default names and to open the form to view information.
-
Step 72: Your form will open on the screen
-
Step 73: showing details for the first employee in the Employees table as well as all the electronic devices that have been assigned to that person.
-
Step 74: You can move from one employee to the next using the navigation tools at the foot of the screen.
Detailed Guide
First, launch Access and choose File> New.
, Click on "Click to Add". , Type Mary, press Enter to move to the next column, and type Smith.
Press Enter twice to move to the second column of the second row, and type Peter, press Enter,and finally type Johnson. , To make these changes, click the View drop-down menu on the Home tab of the Ribbon toolbar, and select Design View. ,,,,,,,,,, To create a second table in which to store information about the electronic devices your employees are using, select the Create tab on the Ribbon toolbar, and click Table. , Type iPhone, and press Enter twice. ("T23" and "iPhone" are just examples.
You can use whatever number scheme makes sense for your business.) , Click the View drop-down menu on the Ribbon toolbar, and click Design View. ,,,,, You’ll need to change that setting so that you can enter the same employee number multiple times if that employee has several devices checked out. ,, When prompted, click Yes to save the table.
Type 2011 as the employee number for the first electronics item in the list.
Then just continue or you can follow the image below. , Now that you've set up the table design, you can enter data into the table. ,,,,, Select the Enforce Referential Integrity checkbox, and click Create. , This line describes a one-to-many link:
One employee can have many devices, but each device can be allocated to only one employee. , Now that the two tables are linked, you can create a form that will make it easy to add employees and devices.,,,,, prompt, click by Employees, choose Form with subform(s), and then click Next. ,,, Here too is a 'New (Blank) Record' button that you can click to add a new employee.When you add a new electronics item, Access will associate it with the current employee automatically.
About the Author
Nicholas Richardson
Committed to making DIY projects accessible and understandable for everyone.
Rate This Guide
How helpful was this guide? Click to rate: