组合框不显示所有记录的值 [英] Combo box not displaying value for all records

查看:65
本文介绍了组合框不显示所有记录的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我从最后一个问题得到了一些非常有用的建议,所以我回来了!只有我的第二篇文章所以请耐心等待 - 我对此非常陌生,所以这可能不会那么简洁(我在表达自己时遇到了一些麻烦,我不确定是什么'重要的是包括!)。


我正在尝试为驾驶教练熟人建立一个数据库,并有一个输入学生详细信息的表格,f_Pupils。每个学生都分配一个区域,根据这个区域,可以选择驾驶教练。


在f_Pupils上,我有一个名为cbArea的组合框,其中包含源为表t_Area的区号。您选择所需的那个并将其存储在t_Pupils(底层学生表)中。然后我有第二个组合框cbInstructor_All,用户可以在其中选择驾驶教练。显示的唯一值是那些覆盖先前选定区域的教师。 cbInstructor_All的Row源是:

Hi all

I got some really useful advice from here with my last question so I''m back for more! Only my second post so please bear with me - I''m very new to this so this will probably not be as concise as it could be (I''m having a bit of trouble expressing myself and am not sure what''s important to include!).

I''m trying to build a database for a driving instructor acquaintance and have a form to enter pupil details, f_Pupils. Each pupil gets allocated an area and depending on what this is, there is a choice of driving instructors.

On f_Pupils, I have a combo box called cbArea, which contains area codes for which the source is a table, t_Area. You select the one you want and it stores it in t_Pupils (the underlying pupil table). I then have a second combo box, cbInstructor_All, where the user can select a driving instructor. The only values displayed are those instructors who cover the area previously selected. The Row source for cbInstructor_All is:

展开 | 选择 | Wrap | 行号

推荐答案

Betty,


我希望大多数提问者都能像你一样清楚地解释他们的情况。感谢您的努力。


但是,选择教练的情况,以及教师姓名有时显示,有时不显示,并不是真的有任何我可以使用的信息(自然足够 - 如果你知道为什么你不会发出正确的问题。)


我想问的是,是一些示例数据显示了这个过程。一些数据有效,有些数据无效。我假设它不像在[t_Instructors]表中没有填充的记录那么简单吗?


我也会问 - 为什么教师会有单独的表格'的名字和他的地区?完全有可能这有一个很好的理由,但这是一个不寻常的设计。
Betty,

I wish most of our questioners could explain their situations as clearly as you do. Your efforts are appreciated.

However, the situation around selecting an instructor, and the instructor name sometimes showing and sometimes not, doesn''t really have any information I can work with (Naturally enough - if you knew why you wouldn''t post the question right).

What I would like to ask for though, is some example data that shows the process. Some data which works and some which doesn''t. I''m assuming it''s not as simple as the record not being populated in the [t_Instructors] table?

I would also ask - why are there separate tables for the instructor''s name and his area? It''s perfectly possible there is a good reason for this but it''s an unusual design on the face of it.


你好那里


感谢您回复我的问题!我有一个单独的教师和区域表的原因是因为每个教师都有许多领域;反之亦然,一些教师覆盖了相同的领域。我有一张桌子可以存放哪些教师可以覆盖哪些区域,区域和教练都在重复,但从不在同一个组合中。


有问题的表格与我的学生记录有关表。用户需要记录每个学生所在的区域,然后根据此分配教师。正确的值存储在正确的表中 - 我的conbo框中的列表包含从教师表中提取的教师名称;用户选择一个可用名称,然后将该教师的ID存储在t_Pupils中。但是我希望教师名称在组合框中可见,但有时当我回到我之前填充教师名称的表单中的记录时,虽然ID正确存储在t_Pupils中,但f_Pupils中的conbo框是空白。


至于有效的数据和数据的例子,我不知道该给你什么 - 你想要表中的数据和/或一些数据吗?屏幕截图?对不起,如果这是一个愚蠢的问题 - 我不想给你一大堆无用的东西!那什么都没解释!



:)
Hello there

Thanks for replying to my question! The reason I have a separate table for instructors and areas is because each instructor has a number of areas they cover; and vice versa, a number of instructors cover the same areas. I have a table to store which instructors cover which areas, where both area and instructors are repeated, but never in the same combination.

The form with the problem is linked to my pupil record table. The user needs to record the area each pupil is in and then allocate them an instructor based on this. The correct value is being stored in the correct table - the list in my conbo box contains instructor names, pulled from the instructor table; the user selects one of the available names and the ID for this instructor is then stored in t_Pupils. However I want the instructor name to be visible in the combo box, but sometimes when I go back to a record in the form where I have previously populated the instructor name, although the ID is correctly stored in t_Pupils, the conbo box in f_Pupils is blank.

As far as examples of data which works and data which doesn''t, I''m not sure what to give you - do you want data from the tables and/or some screen shots? Sorry if this is a stupid question - I don''t want to give you a load of useless stuff! that doesn''t explain anything!


:)


我真的想要一些可以帮助我理解可能出错的数据。


让我们以另一种方式做。你可以为我检查一个非工作场景,并告诉我所选择的教师(其名称在表格上没有正确显示)是否在[t_Instructors]表中有记录。


我希望确定这是形式(控制)级设计问题还是数据级问题。


可能证明有用的另一件事是元数据(相关表格的布局/结构信息(包括学生,教师和区域)。


单击回复按钮可访问我使用过的所有代码。 PK& FK代表Primary Key&外键分别为。
表名= [ t_Pupil ]
Really I just want some data that might help me to understand what may be going wrong.

Let''s do it another way. Can you check a non-working scenario for me and tell me if the Instructor that is selected (whose name is NOT showing up correctly on the form) has a record in the [t_Instructors] table.

I''m hoping to determine whether this is a form (control) level design problem or a data level problem.

Another thing which may prove helpful would be meta data (info about the layout / structure) for the relevant tables (Those covering pupils; instructors and areas).

Click on the Reply button to get access to all the codes I''ve used. PK & FK stand for Primary Key & Foreign Key respectively.
Table Name=[t_Pupil]
展开 | 选择 | 换行 | 行号


这篇关于组合框不显示所有记录的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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