未绑定的列表框 [英] unbound list box

查看:108
本文介绍了未绑定的列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有2个多选列表框的未绑定表单。 grp& io。

IO列表框是未绑定的,取决于grp列表框但是从grp列表框完成后我得到一个空的IO列表框。

以下代码经过测试且确定无误。

展开 | 选择 | Wrap | 行号

解决方案

您好。您似乎在WHERE子句中缺少比较运算符。我不知道它应该是''=''还是其他什么,但它可能是IN(因为你似乎已经通过列表框循环来构建变量GRPS)。我在下面列出了IN,但你需要替换它应该是什么。如果没有合适的操作符,当前WHERE子句将不返回任何行。

展开 | 选择 | Wrap | 行号


As Stewart'的编辑说明,请在发布代码时使用代码标签。你还需要发布整个sub或者至少告诉我们你有代码的事件.Stewart和我认为你已经把它放在了grp组合框的 AfterUpdate 事件中,它在那里属于,但人们经常把它放在其他地方,这可能会导致问题。


欢迎来到字节


Linq ; 0)>



嗨。您似乎在WHERE子句中缺少比较运算符。我不知道它应该是''=''还是其他什么,但它可能是IN(因为你似乎已经通过列表框循环来构建变量GRPS)。我在下面列出了IN,但你需要替换它应该是什么。如果没有合适的操作符,当前WHERE子句将不返回任何行。

展开 | 选择 | Wrap | 行号


i have an unbound form with 2 multiselect list boxes. grp & io.
the IO listbox is unbound and depends on the grp listbox but after finishing from the grp listbox i''m getting a null IO listbox.
the below code is tested and ok.

Expand|Select|Wrap|Line Numbers

解决方案

Hi. You appear to be missing a comparison operator in your WHERE clause. I do not know whether it should be ''='' or whatever, but it might be IN (as you appear to have looped through the listbox to build variable GRPS). I have listed IN below, but you will need to substitute what it really should be. The current WHERE clause will not return any rows without a suitable operator in place.

Expand|Select|Wrap|Line Numbers


As Stewart''s edit note says, please use code tags when posting code. You also need to post the entire sub or at least tell us what event you have the code in. Stewart and I assume that you''ve placed it in the AfterUpdate event of the grp combobox, where it belongs, but people frequently place it alsewhere, which can cause problems.

Welcome to bytes!

Linq ;0)>


Hi. You appear to be missing a comparison operator in your WHERE clause. I do not know whether it should be ''='' or whatever, but it might be IN (as you appear to have looped through the listbox to build variable GRPS). I have listed IN below, but you will need to substitute what it really should be. The current WHERE clause will not return any rows without a suitable operator in place.

Expand|Select|Wrap|Line Numbers


这篇关于未绑定的列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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