子窗体过滤器不起作用 [英] Subform filter not working

查看:136
本文介绍了子窗体过滤器不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个组合框,其中列出了一个值,当选择时,表单应该过滤以显示表中的相应记录。当我单独打开表单时,一切正常。但是,我希望这个表单是一个子表单,但当我把它放在另一个表单时,过滤器退出工作。以下是过滤器的代码。

I have a combo box with a list a values that when picked the form should filter to show the corresponding record from a table. Everything works fine when I open up the form by itself. However, I want this form to be a subform but when I put it in another form the filters quit working. Here is the code for the filter.

展开 | 选择 | Wrap | 行号

推荐答案

Becker,

将我替换为我。带有''s'形式的标识符(第3行,第7行,第10行......)


你会发现那些单独使用Me引用的表单将会自行运行用作子表单时经常会中断。我发现用表格的实际名称替换我经常解决这个问题。


-z
Becker,

Replace the "Me" identifiers with the form''s name (lines 3, 7, 10, etc...)

You''ll find that forms that work fine by themselves with a Me reference will often break when used as a subform. I''ve found that replaceing the Me with the form''s actual name often fixes this issue.

-z


我改变了代码
展开 | 选择 | Wrap | 行号


您可以嵌入一个具有requery的宏。 onchange中的行动组合框的事件。每次更改组合框的值时,这将重新查询子表单的记录。
you can embed a macro having "requery" action in the "onchange" event of the combo box. this will requery the records of the sub-form every time when you change the value of the combo box.


这篇关于子窗体过滤器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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