Ms Access 简明教程
MS Access - Navigation Form
Access 包含一个导航控件,可以轻松地在数据库中的各种表单和报表之间切换。导航表单只是一种包含导航控件的表单。导航表单是任何桌面数据库的极佳补充。
Access includes a Navigation Control that makes it easy to switch between various forms and reports in your database. A navigation form is simply a form that contains a Navigation Control. Navigation forms are a great addition to any desktop database.
-
Microsoft Access offers several features for controlling how users navigate the database.
-
We have already used navigation pane to navigate through all of the Access objects we create, such as forms, queries, tables, etc.
-
If you want to create your own navigational structure and make it easier for the users to find the specific objects that they really need, you can build navigation form, which is a form that uses a navigation control so users can use or view forms and reports right from within that main navigation form.
Example
现在我们来看一个简单的示例,其中我们将创建一个导航表单。为此,请转到“创建”选项卡;在“表单”组中,你将看到此导航下拉菜单。
Let us now take a simple example in which we will create the navigation form. For this, go to the Create tab; in the Forms group, you will see this navigation drop-down menu.
在此菜单中,你将看到用于排列你想要嵌入到此导航表单中表单和报表的不同布局。
In this menu, you will see different layouts for how to arrange your forms and reports that you would like to embed on this navigation form.
-
There is one with horizontal tabs, one with vertical tabs — where all the tabs are aligned to the left, a vertical tabs layout where all the tabs are aligned to the right.
-
There is a horizontal tabs layout that has two levels to it, so if you have a lot of objects that you want to display across the top, you can make use of this.
-
You can have one where you have both horizontal tabs and vertical tabs, either aligned to the left or to the right.
在以下示例中,我们将使用水平选项卡和垂直选项卡。要创建该布局或该导航表单,只需单击它,Access 就会创建一个不限表单,其中包含一个导航控件。
In the following example, we will be using Horizontal Tabs and Vertical Tabs. To create that layout or that navigation form, simply click on it, and Access will create an unbound form, with a navigation control on it.
向此导航表单添加对象的最简单方法是通过你的布局视图,只需将对象拖放至你希望它们显示的位置即可。
To add objects to this navigation form, the easiest way to do is through your layout view, by simply dragging and dropping objects to where you want them to appear.
现在让我们从导航窗格中拖动 frmProjects 表单并将其放到顶部的 [添加新项] 上。
Let us now drag frmProjects form from the navigation pane and drop it on the [Add New] on the top.
类似地,从导航窗格拖动 frmAuthers 表单,并将其放置在“新建”按钮的左侧。
Similarly, drag frmAuthers form from the navigation pane and drop it to the left of the Add New Button.
让我们现在添加其他与项目相关的表单,如 frmSubTasks、frmCurrentProjects 等。
Let us now add other forms related to Projects such as *frmSubTasks, frmCurrentProjects *etc.
现在让我们在顶部添加其他的标签。我们先添加 frmEmployees 表单。
Let us now add additional tabs across the top. We will first add the frmEmployees form.
现在,您将看到您的其他项目按钮已经从左侧消失了,这是因为它们附加到了项目标签。您在左侧看到的所有按钮都链接到您在顶部所选择的任何内容。现在,在选择“员工”标签后,让我们将与员工相关的信息拖动到左侧。
Now, you will see that your other project buttons have disappeared from the left and that is because they are attached to Project tab. All the buttons you view on the left are linked to whatever you have selected up the top. Now with the Employee tab selected, let us drag employees-related information to the left.
现在一个标签上是我们项目信息,另一个标签上是员工信息。类似地,您可以根据要求添加更多的标签。正如您所看到的那样,这些标签的名称不恰当,所以让我们开始重命名其中一些标签,以便使其更加用户友好。最简单的方法是双击左侧的任意标签或任意按钮,然后按如以下屏幕截图中所示重命名。
Now we have project information on one tab, employee information on the other. Similarly, you can add more tabs as per your requirements. As you can see that the name of the tabs is not appropriate, so let us start renaming some of these tabs to make them more user-friendly. The easiest way is to double-click on any tab or any button on the left and rename it as shown in the following screenshot.