如果您有Office 365订阅,您可以访问的应用之一是Access。它是在您的计算机上创建各种类型的数据库和报告的工具。如果您正在寻找有关如何构建数据库的方法,无论您想要构建简单数据库还是复杂数据库, MS Access都是最好的方法。(MS Access)
您可以使用该工具来构建数据库、为数据条目创建表单、使用自定义查询过滤数据以及根据数据生成报告。有分步向导可帮助您创建这些项目,因此使用起来并不难。
如何使用 MS Access 构建空白数据库(How To Build a Blank Database With MS Access)
您需要做的第一件事是建立一个数据库。为此,请在Access中启动一个新数据库。您的数据表、表单、查询和报告将保存在其中。为此,您可以使用Access提供的众多模板之一,也可以从头开始构建一个。
在这里,我们将构建一个存储学生信息的数据库,并且我们将使用一个空白数据库模板。
- 在您的计算机上启动Access应用程序(Launch the Access app)。
- 单击左侧边栏中的新建(New)以创建新数据库。
- 选择右侧窗格中的空白数据库选项以创建新的空白数据库。(Blank database)
- 单击(Click)小文件夹图标并选择保存数据库的路径。然后,单击显示Create的按钮。
- 这就是您使用Access构建数据库的方式。您的数据库应该在指定路径上可用。
在数据库中创建表(Create a Table In Your Database)
任何数据库的基础都是表。正是这些表格,您的数据保存在各个列中,您可以在这些表格上运行查询并从中生成报告。
在Access中构建新数据库时,它会在数据表视图中打开新表创建屏幕。此视图不是最容易使用的,因此您需要将其更改为设计视图,然后创建表格列。
- 右键单击(Right-click)新创建的表并选择Design View。
- 它会提示您先保存表格。输入表的名称并单击OK。
- 以下屏幕允许您将列及其数据类型添加到表中。保持第一列不变,因为它会为您的每件商品生成一个唯一 ID。
- 在我们构建学生数据库时,将光标放在第二个字段中并输入Student Name。从数据类型(Data Type)字段中选择短文本。(Short Text)
- 输入Age作为下一个字段名称,然后从Data Type下拉菜单中选择Number 。
- 添加名称为Country和Short Text作为数据类型的最后一列。
- 按Ctrl + S保存表格。
在数据库中创建数据输入表单(Create a Form For Data Entry In Your Database)
虽然您可以在数据表视图中打开表格并向其中添加所需的数据,但表单将为您提供一种更简单的数据输入方式。您也不必干预表格中的任何其他数据,因为表单只允许您一次编辑一个条目。
您可以使用 Access 的表单向导为您选择的字段创建数据输入表单。(create a form for data entry)
- 当Access仍与您的数据库一起打开时,单击顶部的Create选项卡并选择(Create)Form Wizard选项。
- 它会要求您选择要在表单中使用的字段。选择您需要为其输入值的所有内容,然后单击右箭头图标将它们添加到列表中。然后点击底部的下一步。(Next)
- 以下屏幕提供了四种表单布局供您选择。单击(Click)任何布局,左侧将出现预览。做出选择后,单击底部的下一步。(Next)
- 输入表单的名称并点击Finish。
- 表单应该打开,让您将数据添加到表中。
创建查询以过滤数据库中的数据(Create a Query To Filter Data In Your Database)
查询允许您使用各种自定义条件过滤保存在表中的数据。例如,如果您要检索 20 岁或以上且居住在美国的学生的数据,您可以创建一个查询并生成一个表,其中仅包含符合您的条件的学生。
- 单击顶部的Create选项卡并选择(Create)Query Wizard。
- 选择第一个选项Simple Query Wizard并点击OK。
- 选择要包含在查询中的表和字段,然后单击Next。
- 在以下屏幕上选择详细信息(Detail)选项,然后单击底部的下一步。(Next)
- 输入查询的名称,然后点击底部的完成。(Finish)
- 右键单击新创建的查询并选择Design View。您将使用此视图输入查询条件。
- 以下屏幕允许您为查询指定过滤器。让我们创建一个仅显示 20 岁或以上且来自美国的学生的规则。在年龄(Age)字段的条件(Criteria)框中
键入>=20在Country(Country)字段的Criteria行中输入US 。
- 按Ctrl + S 保存更改。
- 双击(Double-click)左侧边栏中的查询,您将看到数据的过滤版本。
如何在 Access 中构建数据库报表(How To Build a Database Report In Access)
报告通常用于将数据带出Access并将它们作为独立文件查看。Access允许您为您选择的表和字段生成报告,它使用与表单和查询相同的向导样式来生成报告。
- 单击顶部的创建选项卡并选择(Create)报告向导(Report Wizard)。
- 添加您希望在报告中包含的字段,然后单击Next。
- 如果您想指定任何分组订单,您可以在此屏幕上执行此操作。然后点击Next。
- 如果您想按字段对记录进行排序,您可以在此屏幕上执行此操作。然后单击下一步(Next)。
- 选择一个报告布局并点击Next。
- 输入报告的名称并单击Finish。
- 右键单击(Right-click)报告并选择Print Preview。
- 单击顶部的PDF 或 XPS以将其保存为这两种格式中的任何一种。(PDF or XPS )
包含表格、表单、查询和报告的完整数据库已准备就绪。
你如何建立你的数据库(build your databases)?如果您使用Access,您是否使用上述功能?请在下面的评论中告诉我们。
How To Build a Database With Microsoft Access
If you have an Office 365 subscription, one of the apps you can access is Access. It’s a tool to create various types of databases аnd reports on your cоmputеr. If you’re looking for а method on how to build а database, MS Aссeѕs is the best way to do it whether уou want to build a simple or a complex dаtabase.
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 it’s not too difficult to use.
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 we’ll build a database that stores student information and we’ll 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.
- That’s 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. It’s 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 isn’t 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.
- It’ll 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 we’re 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. You’ll 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.
- It’ll ask you to select the fields you want to use in your form. Select all that you’ll 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 you’ve 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 you’re looking to retrieve the data of students who’re 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. You’ll use this view to enter the criteria for your query.
- The following screen lets you specify the filters for your query. Let’s 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 you’ll 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 you’d 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.