简体   繁体   English

在Microsoft访问中的子窗体面板中切换窗体

[英]Switching between forms in Subform panel in Microsoft access

I am new in Microsoft Access. 我是Microsoft Access的新手。 What i want is to switch between forms in subform panel depending upon the user selects from drop down list. 我想要的是在子窗体面板中的窗体之间切换,具体取决于用户从下拉列表中选择。 Attach file contains what i want 附件文件包含我想要的内容 在此输入图像描述

I google alot but didnt find any help. 我谷歌很多但没有找到任何帮助。 Thank you for your help. 谢谢您的帮助。

Here is screen shot. 这是屏幕截图。 but I am confused in finding control of subform. 但我很难找到子窗体的控制权。 在此输入图像描述

Forms("frmMain").Form.subFormControl.SourceObject = "SubForm_2_A"

..should be all you need. ..应该是你所需要的一切。
subFormControl is the name of the subform-container-control that contains Subform2. subFormControl是包含Subform2子窗体,容器控件的名称
frmMain is the name of the parent form, not labelled in your picture (actually, you might not have to put subform1 in a subform really, its content could be on the parent form). frmMain是父表单的名称,未在图片中标记(实际上,您可能不必将子表单放在子表单中,其内容可能位于父表单上)。

EDIT: 编辑:
The red frame marks a subform. 红框标记子表单。 Click on -1- to make sure the main form has the focus. 单击-1-以确保主窗体具有焦点。 Then click once on -2- and the control is selected, and its properties show up in the properties box on the right. 然后在-2-上单击一次 ,选择控件,其属性将显示在右侧的属性框中。
Note that you find the "source object" in the data page and the name of the control in the "other" page. 请注意,您在数据页中找到“源对象”,在“其他”页面中找到控件的名称。 Access makes the name (of the control) the same as the form, which is really not such a bright idea and rather confusing. Access使(控件的)名称与表单相同,这实际上并不是一个明智的想法,而是相当混乱。

SampleImage

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM