需要帮助从主窗体中过滤子窗体 [英] Need help Filtering subform from main form

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

问题描述

我正在尝试创建一个位于我的主要表单中的搜索表单。我需要它来过滤几个子表格。


我的主表单包含建筑物名称和房间名称。我有一个客户信息的子表单(名字,姓氏,电话等)。我有一个用于机柜信息的子表单,以及该子表单中用于交换机(设备)信息的子表单。


如果在我的主表单上查看记录,该主表单将显示建筑物名称和房间号码。然后子窗体显示有关该建筑物的信息。例如,如果查看建筑物1,房间100,它将显示Bob Smith作为该房间的POC。


我需要能够搜索Bob Smith。并看到他是POC的所有房间。所以,我需要从主窗体中搜索子窗体。


我已经在网上搜索了几个星期了。我看过每一个我都能看到的视频。我无法弄清楚这一点。


这是我的代码:

展开 | 选择 | Wrap | 行号

解决方案

无论您要过滤的信息项是否在您的主表单上,您的一个子表单(根本不包含在您的数据中),过滤器都应该使用未绑定的ComboBox。从(76.7 KB,33 views)


让我们一次采取一个适当的步骤。如我之前的帖子所示,第一步是让您探索​​该文章并学习您需要的技巧。如果,当你这样做的时候,你仍然有问题,那么我们将采取下一步,只有在这一点上才会明确。如果在任何后期阶段,我觉得我需要查看您的项目,那么您可以确定我会提出要求。


请记住,这是您的项目。我们可以提供帮助,但你是那个做重的人。您没有义务遵循我们给出的任何建议,但是如果您发现自己处于未知领域,您是否应该选择不要感到惊讶。


我的信念是一旦你花了一点时间玩那篇文章中的例子,你就会很清楚,不需要任何帮助,但我们只能确定我们何时进入那个阶段。


I''m trying to create a search form which is located in my main form. I need it to filter several subforms.

My main form contains building name and room name. I have a subform for customer information (first name, last name, phone, etc). I have a subform for cabinet information, and a subform within that subform for switch (equipment) information.

If viewing a record on my main form, that main form will display the building name and the room number. Then the subform displays information about that building. For an example, if viewing building 1, room 100, it will show Bob Smith as the POC for that room.

I need to be able to search for "Bob Smith" and see all of the rooms which he is the POC for. So, I need to search in the subform from the main form.

I''ve been searching the web for weeks now. I''ve seen every video I could possibly see. I cannot figure this out.

This is my code here:

Expand|Select|Wrap|Line Numbers

解决方案

Regardless of whether the item of information you want to filter by is on your main form, one of your sub-forms, not included in your data at all, the filter should be done with an unbound ComboBox. There are a number of articles which cover different scenarios that can be found starting at Example Filtering on a Form.

If you can''t find what you need there then please come back here and explain why so that we can give you further, directly helpful, guidance.


Thanks for the reply.

My comboboxes are unbound. I''m attaching a copy of my database. if you open up Navigation Form, click on the rooms tab.

Attached Files
BuildingsSwitches3 (1).zip (76.7 KB, 33 views)


Let''s take it one appropriate step at a time. The first step, as indicated in my previous post, is for you to explore that article and learn the techniques you''ll need. If, when you''ve done that, you still have problems then we''ll take the next step which will only be clear at that point. If, at any later stage, I feel I need to see your project then you can be sure I''ll make a request for it.

Remember, this is your project. We can offer help, but you''re the one doing the heavy lifting. You''re not obliged to follow any advice we give, but should you choose not to then don''t be surprised if you find yourself in uncharted territory.

My belief is that once you''ve spent a little time playing with the example in that article you will understand well enough not to need any more help, but we can only be sure when we get to that stage.


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

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