首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

字符串乘积的实现,该如何处理

2012-03-17 
字符串乘积的实现vbtext1.text数值 combo1.text数值text2.texttext1.text 与combo1.text 数值的乘积If

字符串乘积的实现
vb text1.text=数值 combo1.text= 数值 text2.text= text1.text 与 combo1.text 数值的乘积  
 If Text2.Text <> "" Then Data1.Recordset.Fields("宿费") = ? ?为 $ + text2.text的数值


 text1.text 与 combo1.text 数值的乘积  代码怎么实现
 ?为 $ + text2.text的数值 代码怎么实现
 




[解决办法]

if trim(text1.text)="" then exit sub 
if trim(combo1.text)="" then exit sub 



if trim(text2.text)="" then 
text2=cstr( cdbl(text1.text) *cdbl(combo1.text))
Data1.Recordset.Fields("宿费") = cstr($)+ cstr( text2.text)
end if 

热点排行