从组合框中选择空白值,并根据它找到结果 [英] Select Blank values from combobox and find result depend on it

查看:109
本文介绍了从组合框中选择空白值,并根据它找到结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我必须使用已在MS Access中生成的表(PRODUCTION),其中所有字段都是TEXT类型。字段如(orderdate,palletno,customercode,itemno,pono,carto) n,pcs,totalquantity)现在我已经有了6000行中的一些数据。现在有些字段是空白的。


现在我在MS Access中创建了一个表格,其中有是三个ComboBoxes.1st是独立的,第二个依赖于第一个,第三个依赖于第一个和第二个。现在我必须从第一个comboBox中选择(custcode)之后它将生成第二个组合框的列表。当我从第二个组合框中选择(PONo)时,它将生成第三个组合框的列表,取决于第一个和第二个组合框的选择。所以在最后我列出了从组合框中选择的任何内容。


但是当我从第一个组合框中选择值时,在该选择中也有一些空白字段。所以如果我选择那个空白它必须向我显示列表取决于它。但它只显示空白结果。


这是一个例子,所以你可以很容易理解

例子

表:-PRODUCTION


custcode PONo ItemNo价格

abc 123 456 500

xyz 423 400

abc 789 500

asd 456 550

abc 450

rat 123 500

abc 456 300

伤心200

jkl 456 798 520

abc 798 450

abc 900


in 第一个组合框我有清单

abc

xyz

asd

rat

cat

伤心

jkl


现在当我选择" abc" 来自 1 st combobox 它显示 2nd combobo x的列表,这是

BLANK

123

789


所以当我选择BLANK 时来自第二个组合框它必须生成第三个组合框的列表,这是


BLANK

456

798

(但在我的情况下它没有显示任何内容。)


现在当我选择" BLANK "来自 3rd combobox 它必须向我显示最后的结果

450

$

(但不是它什么都没有给我看。


所以如何选择那个空白区域。?

我不能改变桌子,因为有人已经制作了它现在我必须使用它,而且我的项目的数据也在那个表中。如果有任何可能的解决方案,请将它交给我。任何解决方案appriciated.plz帮助我

Hi,
I have to use the table(PRODUCTION) already generated in MS Access in which all fields are of TEXT type.fields like (orderdate,palletno,customercode,itemno,pono,carto n,pcs,totalquantity)Now i have already some data in table like 6000 rows.Now in that some fields are blank.

Now I have created one Form in MS Access in which there are three ComboBoxes.1st one is independent,2nd one is dependent on 1st one and,3rd one is dependent on both 1st and 2nd. Now I have to select (custcode) from 1st comboBox after that it will generate list for 2nd combobox.now when i am selecting (PONo) from 2nd combobox it will generate list for 3rd combobox depend on choice of 1st and 2nd combobox.So at the end i have the list of whatever i selected from comboboxes.

but when i am selecting value from 1st combobox there are some blank fields also in that selection.So if I select that blank field it have to show me the list depend on it.but it show me just blank result.

This is the example so u can understand easily
EXAMPLE
Table:-PRODUCTION

custcode PONo ItemNo Price
abc 123 456 500
xyz 423 400
abc 789 500
asd 456 550
abc 450
rat 123 500
abc 456 300
sad 200
jkl 456 798 520
abc 798 450
abc 900

in the 1st combobox i have list
abc
xyz
asd
rat
cat
sad
jkl

now when i am selecting "abc" from 1st combobox it show me the list for 2nd combobox which is
BLANK
123
789

so when i am selecting "BLANK" from 2nd combobox it has to generate list for 3rd combobox which is

BLANK
456
798
(but it shows nothing in my case.)

now when i am selecting "BLANK" from 3rd combobox it has to show me the last result like this
450
900
(but instead of that it will show me nothing)

so what to do to select that blank field.?
I can''t change the table because someone already made it and now i have to use it and also my project''s data are in that table.so plz if there is any possible solution plz give it to me.Any solution appriciated.plz help me
.

推荐答案

那里。


这是三态逻辑的问题(真,假,空) - 任何带有Null的表达式将返回Null,在仅适用二价逻辑(True,False)的情况下将其视为False。

这会导致两个空白(包含Null值)字段被识别为不等于


有几种方法可以解决这个问题。
  • 添加检查Nulls两种情况
Hi, there.

That is an issue of tristate logic (True, False, Null) - any expression with Null will return Null which is treated as False in a situation where bivalent logic (True, False) only is applicable.
This causes the situation when two blank (containing Null value) fields are recognized as not equal.

There are several options to overcome it.
  • add checking for both Nulls situation
展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号


哦哇,现在它确实有效。

非常感谢你好。
Oh wow,now its really works.
Thank You Very Much Buddy.


欢迎您。


祝你好运,

You are welcome.

Best regards,
Fish


这篇关于从组合框中选择空白值,并根据它找到结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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