在文本框中替换数字 [英] Substitute word for number in textbox

查看:83
本文介绍了在文本框中替换数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示项目状态的文本框,但状态为

显示为数字,数字表示类似完成"或者在

开发中。


有没有办法让我可以看一些VB代码,看看是否有一个

8,然后显示已完成或者如果有一个10它显示正在开发中?



Visual Basic将成为我的结尾lol

I have a text box that displays a projects status, but the status is
displayed as a number and the number means something like " Completed" or "In
Development".

Is there a way that i can have some VB code look and see that if there is an
8, then display "Completed" or if there is a 10 it display "In development"?



Visual Basic is going to be the end of me lol

推荐答案


我有一个文本框...有没有办法让我有一些VB代码看看,如果有的话8,然后显示已完成或者如果有10则显示正在开发中?
I have a text box ... Is there a way that i can have some VB code look and see that if there is an 8, then display "Completed" or if there is a 10 it display "In development"?



当然,用字符串代替数字本身就很简单。但是你能告诉我们更多细节吗?例如,你使用的是什么版本的VB?文本框是否绑定到任何内容?文本框的值对程序有意义,还是仅为用户显示?用户可以修改还是锁定?

Substituting a string for a number is in itself quite simple, of course. But can you give us a bit more detail? For instance, what version of VB are you using? Is the textbox bound to anything? Is the value of the textbox of any significance to the program, or just a display for the user? Is it modifiable by the user, or locked?



当然,用字符串代替数字本身就很简单。但是你能告诉我们更多细节吗?例如,你使用的是什么版本的VB?文本框是否绑定到任何内容?文本框的值对程序有意义,还是仅为用户显示?是可由用户修改还是锁定?
Substituting a string for a number is in itself quite simple, of course. But can you give us a bit more detail? For instance, what version of VB are you using? Is the textbox bound to anything? Is the value of the textbox of any significance to the program, or just a display for the user? Is it modifiable by the user, or locked?




完全没问题


我正在运行VB 6.3。


文本框绑定到表中的ID字段(由生成表查询生成,该查询从链接的数据库中提取所有信息)。表中的数据是两种状态之一,Ready For Development或In Development。但我的问题是这些状态是由一个数字标识的。


8 =准备开发

10 =开发中


在我的表格上我有一个状态框,它只显示了一个像它一样的id来显示Ready for Dev。如果框中有8,如果框中有10,则为In Dev。



Yes not a problem at all

I am running VB 6.3.

The text box is bound to an ID field in a table( which is made by a make table query that pulls all information from a linked DB). The data in the table is either one of two statuses, Ready For Development or In Development. But my problem is that these statuses are identified by a number.

8= Ready for Dev
10= In dev

On my form i have a status box and it is only showing a number id like it to show Ready for Dev. if there is an 8 in the box and In Dev if there is a 10 in the box.



是的根本不是问题


我正在运行VB 6.3。


文本框绑定到表中的ID字段(由make表查询生成)从链接的数据库中提取所有信息)。表中的数据是两种状态之一,Ready For Development或In Development。但我的问题是这些状态是由一个数字标识的。


8 =准备开发

10 =开发中


在我的表格上我有一个状态框,它只显示了一个像它一样的id来显示Ready for Dev。如果框中有8,如果框中有10,则为In Dev。
Yes not a problem at all

I am running VB 6.3.

The text box is bound to an ID field in a table( which is made by a make table query that pulls all information from a linked DB). The data in the table is either one of two statuses, Ready For Development or In Development. But my problem is that these statuses are identified by a number.

8= Ready for Dev
10= In dev

On my form i have a status box and it is only showing a number id like it to show Ready for Dev. if there is an 8 in the box and In Dev if there is a 10 in the box.



在你的查询中添加一个case语句,这将在sql server中作为SQL工作,所以我认为如果你在sql查询中添加它,它应该适用于访问。


你是否已经说过在查询中选择Id与以下交换它

当Id = 8时选择案例然后''准备开发''当id = 10然后''在开发''结束'

然后添加其余或你的选择语句

in your query add a case statement, this will work in sql server as SQL so i think it should work for access if you add it in the sql query.

wher eyou have stated the selecting the Id in the query swap it with the following
"Select Case When Id = 8 Then ''Ready for Dev'' When id = 10 Then ''In Dev'' End"
then add the rest or ur select statement


这篇关于在文本框中替换数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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