In this tutorial we will learn how to create a small table and fill it with data. These tables will be filled in manually by us and will be maintained within the Access Database.
The two tables will be:
- Employee Hours Billed
- Employee Addresses
Employee Hours Billed
- Open the blank database you created earlier
- Go to the Create tab
- Click on Table
Notice that a screen has popped up that resembles an Excel spreadsheet with a row and column grid. There is also a “Table1” in the left “Access Objects” Panel
- You can type in the values manually or copy and paste them. Lets do the latter to make things a bit easier
- Use the attached Employee_Hours_Billed spreadsheet and select the range
- Copy the data
- Go to your Access Database
- Right click in the “Click to Add” column and choose “Paste as Fields”
- If you get a warning that the field name you provided is a reserved word, click “OK”
- Access will notify you on how many records you are about to add to the table (4)
- Press “Yes”
- You will now see your data in the Access table just as it was in the Excel spreadsheet.
You might notice that there is an ID column and an EMPLID column in our table. When you make a table in this manner, Access tries to establish it’s own unique identifier. The default is an ascending number for each row and since we already have a unique ID for our employees, we can delete the default from our table as it is not needed.
Access terms this “Unique ID” as the “Primary Key”
- Go to design view (far left icon) for our table, you will be prompted to save
- Save the Table as “tbl_Employee_Hours“
- Select the “ID” field
- Right click
- Choose delete rows
- Access will double check and make sure you want to delete the row, choose “Yes”
- Access will warn you that you are deleting the “Primary Key”, choose “Yes”
- Click the “View” button (far left icon) to view our data
- You will be prompted for a save, choose “Yes”
Congratulations! You have now created your first table in Access!
Repeat these steps for the Employee Address information