彼此依赖的多个组合框需要唯一值 [英] multiple combo boxes that are dependent on each other need unique values

查看:65
本文介绍了彼此依赖的多个组合框需要唯一值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先我要说这是我的第一个数据库。我遇到的问题是我在一个表单上有7个组合框,它们彼此依赖,并且只有两个组合框是diplaying唯一值。其余的显示重复值。我需要所有组合框都有唯一的值。如果我按顺序选择所有组合框,它的效果非常好。我有它所以你可以将组合框留空以获得更大的搜索结果。如果将下拉框留空并在其他组合框中选择其中一个重复值,搜索仍然有效。我只是想摆脱所有重复的值。我已尝试在行源上使用distinct,但仅适用于其中一个组合框。任何帮助将不胜感激!

Let me start by saying this is my first database. The problem I am having is I have 7 combo boxes on a form that are dependent on each other and only two of them are diplaying unique values. The rest of them display duplicate values. I need all the combo boxes to have unique values. It works perfectly if I choose all the combo boxes in order. I have it so you can the combo boxes blank for a bigger search result. The search still works if you leave drop down boxes blank and choose one of the duplicate values in the other combo boxes. I just want to get rid of all the duplicate values. I have tried using distinct on the row source but that only worked for one of the combo boxes. Any help would be appreciated!

推荐答案

你是什么意思只有两个显示唯一值?

是绑定到记录源的表单,还是用于为其他表单或报表创建过滤器的未绑定表单?

此外,这些组合框是绑定还是未绑定? (换句话说,他们有一个控制源?)
What do you mean by "only two of them are displaying unique values"?
Is the form bound to a record source, or is it an unbound form you are using to create a filter for another form or report?
Also, are these combo boxes bound or unbound? (in other words do they have a control source?)


例如,两个正在工作的只有一个a,b,c,d。其他的具有a,a,a,a,b,b,b,b,c,c,c,c,d,d,d,d。但是,如果我按顺序选择框,则下一个框不会显示重复项。只有当我想将上面的框留空时(意味着我想看到所有相关的选项)。组合框是未绑定的,每个组合都有一个下拉项目表,然后在主记录表中搜索匹配项。
For example, the two that are working have only one a,b,c,d in each. The others have a,a,a,a,b,b,b,b,c,c,c,c,d,d,d,d. But if I choose the boxes in order the next box doesn''t display duplicates. It''s only when I want to leave the above boxes blank (meaning I want to see all the associated options). The combo boxes are unbound and each combo has a table of the drop down items which then searches the master record table for matches.


首先,为什么组合框中有重复的项目?


其次,
First, why do you have duplicate items in a Combo Box?

Second,

但如果我按顺序选择框,则下一个框不会显示重复项。
But if I choose the boxes in order the next box doesn''t display duplicates.



你是如何做到这一点的?你没有提及任何代码更新这些组合框的Row源代码,所以这也可能对我们有所帮助。


目前还不完全清楚你在这里问的是什么。

How are you making this work? You mention nothing about any code updating the Row source for these combo boxes, so that might help us, too.

It is still entirely unclear what you are asking here.


这篇关于彼此依赖的多个组合框需要唯一值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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