简体   繁体   English

在MS Access中更改子窗体的记录

[英]Changing Record of Subform in MS Access

I have a form that contains 4 subforms. 我有一个包含4个子表单的表单。 The first subform gets data based on a selection in a combo box on the main form. 第一个子窗体基于在主窗体上的组合框中的选择来获取数据。 The second subform gets data based on the first subform, and the third and fourth subforms get data based on the first. 第二个子表单基于第一个子表单获取数据,而第三和第四个子表单基于第一个子表单获取数据。

It's a database contain information on research grants. 它是一个数据库,其中包含研究补助金的信息。 I want to be able to pull up certain data based on a person's ID (multiple records to a person) or by the title of the grant. 我希望能够根据一个人的ID(给一个人的多个记录)或拨款的标题来提取某些数据。 Names are working fine, but searching by title is giving me a hard time. 名称工作正常,但是按标题搜索使我很难受。

I've tried setting first subform's Record Source with a .RecordSource ="" line, but nothing updates at all when the code runs (the code is in the AfterUpdate event of the combo box containing grant titles). 我尝试用.RecordSource =“”行设置第一个子窗体的Record Source,但是在代码运行时根本没有更新(代码在包含授权标题的组合框的AfterUpdate事件中)。 This one has me sort of stuck; 这使我有些困惑; I'm not sure if the dependencies among my forms have something to do with it. 我不确定表单之间的依赖关系是否与此有关。

更新记录源后是否放入Form.Refresh?

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

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