将未绑定的组合框从数字更改为文本 [英] Change unbound combobox from number to text

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

问题描述

我有一个包含12个未绑定组合框的表单,其查询是从它之前的组合框确定的。示例:No2 box rowsource设置为查询,然后在box1的afterupdate上重新获得。


现在如果sombody在box2上出错并且在box5上,那么他们可以重新调整他们的box2选项。当他们这样做时(因为每个框重新查询下一个框)我从其余的框(3,4,5)中清空值,然后根据他们选择的内容重新获得它们。


当box5查询返回数字格式时,会出现此问题。我需要数字格式,以便我可以按照我选择的方式保留十进制格式。下一次使用框5,结果是文本,然后我收到关于您选择的值无效的警告。我尝试将box5上的格式设置为number4焦点事件上的文本,如此

I have a form with 12 unbound comboboxes whose query is determined from the combobox before it. Example: No2 box rowsource is set to the query and then requeried on the afterupdate of box1.

Now if sombody makes a mistake on box2 and is on box5, then they can redrop down their box2 option. When they do this (since each box requeries the next box) i empty the values form the rest of the boxes (3, 4, 5) and then they get requeried depending on what they have chosen.

The problem occurs when the box5 query returns a number format. I need the number format so that i can keep the decimal format the way i have chosen. The next time box 5 is used, and the result is text, then i get the warning about "the value you have chosen is not valid". I tried setting the format on box5 to text on the number4 got focus event like this

展开 | 选择 | Wrap | 行号

推荐答案

K,


你问一个关于如何处理某些数据的问题,但是你没有给我们任何关于我们应该考虑的数据的信息,除了它来自查询这取决于ComboBox#4。


通过对问题的一些澄清,我确信有人可以提供帮助。
K,

You ask a question regarding how to handle certain data, but you don''t give us any information about the data we should be considering, other than it is from a query which changes depending on ComboBox #4.

With some clarification of the question I''m sure someone could help.


我同意NeoPa我们需要的更多信息,以帮助。我也很困惑,对于组合框5的查询如何能够一次返回文本数据而另一方面返回数值数据。


Linq ; 0)>
I agree with NeoPa that we need more information in order to help. I''m also confused as to how the query for combobox 5 can return text data one time and numeric data another.

Linq ;0)>


典型的afterupdate事件看起来像这样(这是no2框的afterupdate的一部分)
A typical afterupdate event looks like this (this is part of the afterupdate of the no2 box)
展开 | 选择 | 换行 | 行号


这篇关于将未绑定的组合框从数字更改为文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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