Mainform和多个子表单搜索... [英] Mainform and multiple subforms search...

查看:64
本文介绍了Mainform和多个子表单搜索...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有


i需要有人帮我一个代码,这个代码可以让我通过连接到主窗体的组合框以子窗体形式过滤记录 - 主菜单有一个主菜单控制在mainform未绑定帧上的sourceObject下运行的所有子表单。


喜欢,当在mainform组合框中的公司名称时,子表单只显示该公司的记录。例如,像过滤查询时的工作方式..


问候。 lovelydan


P.S.子表单遍历代码; Me.Subform.SourceObject =""


例如Me.Subform.SourceObject ="?ssets"

hi all

i need someone to help me with a code that will enable me filter records in a subform form through a combo box attached to a mainform-that has a main menu that controls all the sub form that runs under sourceObject on the mainform unbound frame.

like, when i a company name on mainform combo box then the subform shows only records for that company. eg like how it works when filtering a query..

regards. lovelydan

P.S. subforms runs through a code; Me.Subform.SourceObject=""

e.g. Me.Subform.SourceObject="?ssets"

推荐答案

嗨lovelydan,

如果你在代码中设置.SourceObject,你也可以设置.RecordSource也像:
Hi lovelydan,
If you are setting the .SourceObject in code, you might as well set the .RecordSource also like:
展开 | 选择 | Wrap | 行号


感谢ChipR

$ b $我会尝试这个并给你我的回复..


问候,可爱
thanks ChipR

i wil try this and give u my response..

regards, lovely


查看示例过滤表单如何最好地使用Access为您完成工作。


您可以回顾性地更改表单的RowSource,这非常有用。但在大多数情况下,只需更改过滤即可。我怀疑你的情况就是如此。
Check out Example Filtering on a Form for how best to use Access to do the work for you.

You can change the RowSource of a form retrospectively, and this can be extremely useful. In most cases though, simply changing the filtering should be all that''s required. I suspect this to be so in your case.


这篇关于Mainform和多个子表单搜索...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆