How To Build a Database With Microsoft Access2 years agoby Mahesh Makvana
If you have an Office 365 subscription, one of the apps you can access is Access. Its a tool to create various types of databases and reports on your computer. If youre looking for a method on how to build a database, MS Access is the best way to do it whether you want to build a simple or a complex database.
You can use the tool to build a database, create forms for data entries, filter your data using custom queries, and generate reports out of your data. There are step-by-step wizards to help you create these items so its not too difficult to use.Table of Contents
How To Build a Blank Database With MS Access
The first thing you need to do is build a database. To do this, start a new database in Access. Your data tables, forms, queries, and reports will be saved in it. To do it, you can either use one of the many templates that Access provides or build one from scratch.
Here well build a database that stores student information and well be using a blank database template.
- Launch the Access app on your computer.
- Click on New in the left sidebar to create a new database.
- Select the Blank database option on the right-hand side pane to create a new blank database.
- Click on the little folder icon and choose a path to save your database. Then, click on the button that says Create.
- Thats how you build a database with Access. Your database should be available at the specified path.
Create a Table In Your Database
The base of any database is tables. Its these tables where your data is saved in various columns, and this is what you can run queries on and generate reports from.
When you build a new database in Access, it opens the new table creation screen in the datasheet view. This view isnt the easiest to work with and so you need to change it to the design view and then create your table columns.
- Right-click on the newly created table and select Design View.
- Itll prompt you to save your table first. Enter a name for the table and click on OK.
- The following screen lets you add columns and their data-types to the table. Keep the first column as-is because it generates a unique ID for each of your items.
- As were building a student database, put your cursor in the second field and type Student Name. Choose Short Text from the Data Type field.
- Enter Age as the next field name and choose Number from the Data Type dropdown menu.
- Add the last column with the name Country and Short Text as the data type.
- Press Ctrl + S to save the table.
Create a Form For Data Entry In Your Database
While you can open the table in datasheet view and add the required data to it, a form will provide you with an easier way to input your data. Youll also not have to meddle with any other data in the table as a form only lets you edit one entry at a time.
You can use the Access form wizard to create a form for data entry with your chosen fields.
- While Access is still open with your database, click on the Create tab at the top and choose the option that says Form Wizard.
- Itll ask you to select the fields you want to use in your form. Select all that youll need to enter a value for and click on the right arrow icon to add them to the list. Then click on Next at the bottom.
- The following screen offers four form layouts to choose from. Click on any layout and a preview will appear on the left side. Once youve made a selection, click on Next at the bottom.
- Enter a name for your form and hit Finish.
- The form should open letting you add data to your table.
Create a Query To Filter Data In Your Database
A query lets you filter the data saved in your tables using various custom criteria. For example, if youre looking to retrieve the data of students whore 20 years or older and live in the US, you can create a query and generate a table that only has the students in it that match your criteria.
- Click on the Create tab at the top and select Query Wizard.
- Choose the first option that says Simple Query Wizard and hit OK.
- Select the table and the fields you want to include in the query and click on Next.
- Choose the Detail option on the following screen and click on Next at the bottom.
- Enter a name for your query and hit Finish at the bottom.
- Right-click on your newly created query and choose Design View. Youll use this view to enter the criteria for your query.
- The following screen lets you specify the filters for your query. Lets create a rule that only shows students who are 20 years or older and are from the US.
Type >=20 in the Criteria box for the Age field.
Enter US in the Criteria row for the Country field.
- Press Ctrl + S to save the changes.
- Double-click on your query in the left sidebar and youll see the filtered version of your data.
How To Build a Database Report In Access
Reports are usually used to bring data out of Access and to view them as standalone files. Access lets you generate reports for your chosen tables and fields and it uses the same wizard style as forms and queries to make reports.
- Click on the Create tab at the top and select Report Wizard.
- Add the fields youd like to have in your report and click on Next.
- If you want to specify any grouping orders, you can do that on this screen. Then hit Next.
- If you want to sort your records by a field, you can do that on this screen. Then click on Next.
- Select a report layout and hit Next.
- Enter a name for the report and click on Finish.
- Right-click on the report and choose Print Preview.
- Click on PDF or XPS at the top to save it in either of these formats.
Your full database with tables, forms, queries, and reports is ready.
How do you build your databases? If you use Access, do you use the features mentioned above? Let us know in the comments below.