Ms Access 简明教程
MS Access - Adding Data
Access 数据库与 Microsoft Office Word 文档或 Microsoft Office PowerPoint 具有相同意义的文件不同。相反,Access 数据库是由表、窗体、报表、查询等对象组成的集合,这些对象必须共同工作才能使数据库正常运行。我们现在已经创建了两个包含数据库中所有必要字段和字段属性的表。要查看、更改、插入或删除 Access 表中的数据,可以使用该表的数据透视图。
An Access database is not a file in the same sense as a Microsoft Office Word document or a Microsoft Office PowerPoint are. Instead, an Access database is a collection of objects like tables, forms, reports, queries etc. that must work together for a database to function properly. We have now created two tables with all of the fields and field properties necessary in our database. To view, change, insert, or delete data in a table within Access, you can use the table’s Datasheet View.
-
A datasheet is a simple way to look at your data in rows and columns without any special formatting.
-
Whenever you create a new web table, Access automatically creates two views that you can start using immediately for data entry.
-
A table open in Datasheet View resembles an Excel worksheet, and you can type or paste data into one or more fields.
-
You do not need to explicitly save your data. Access commits your changes to the table when you move the cursor to a new field in the same row, or when you move the cursor to another row.
-
By default, the fields in an Access database are set to accept a specific type of data, such as text or numbers. You must enter the type of data that the field is set to accept. If you don’t, Access displays an error message −
让我们通过打开我们创建的 Access 数据库为表格添加一些数据。
Let us add some data into your tables by opening the Access database we have created.
在功能区中选择 Views → Datasheet 视图选项,并按照以下屏幕截图所示添加一些数据。
Select the Views → Datasheet View option in the ribbon and add some data as shown in the following screenshot.
同样,在第二个表中也添加一些数据,如下面的屏幕截图所示。
Similarly, add some data in the second table as well as shown in the following screenshot.
您现在可以看到,在数据表视图中插入新数据和更新现有数据非常简单,就像在电子表格中工作一样。但是,如果您想删除任何数据,则需要先选择整行,如下面的屏幕截图所示。
You can now see that inserting a new data and updating the existing data is very simple in Datasheet View as working in spreadsheet. But if you want to delete any data you need to select the entire row first as shown in the following screenshot.
现在按下删除按钮。这将显示确认消息。
Now press the delete button. This will display the confirmation message.
单击 Yes ,您将看到所选记录已删除。
Click Yes and you will see that the selected record is deleted now.