大家帮忙看看VB中计算问题
大家帮忙看下,在VB中有个变量str=0.00016如何计算让它变成是1.6*10的4次方
还有个问题是关于数据库查询的
在ACCESS中如何查询时,判断字段1是否为空如果是则查询字段2
在SQL中应该是select case 字段1 isnul then 字段2 end from 表名
大家看看在ACCESS中是查询的,解决了再加分
str = cdbl(str) * 100000000#
VB code:
Option Explicit
Private Sub Form_Load()
Dim strP As String
strP = "0.00016"
strP = Val(strP) * 100000000
Text1.Text = strP
End Sub
第一个问题本是1.6×10的-4次方,你要变10的4次,就将其×10的8次方(问题有点过于简单?)
[access] select iif(isnull(字段1),字段2,字段1) from 表名
刚才说错了,应该是1.6*10负4次方,我按照你们的方法怎么结果是160000
VB code:
str = Format$(0.00016,"#.#E+")
VB code:
Dim istr As String
istr = Format(0.00016, "0.##E+")
str = Format$(0.00016,"#.#E+")
VB code:
Private Sub Form_Load()
s = Format(0.00016, "0.0E+")
MsgBox
相关问答:
login.aspx.vb:
Public ReadOnly Property nameT() As String
Get
Return TextBox1.Text
&nb ......
大家好,问个vb打印问题
printer.print "dsff"
.....
....
Printer.EndDoc
打印成功后我将执行
sqlstr = "update vc_yh set pr=' 已打印 ', ......
VB與VB.NET區別是什么?
除了语法差不多,几乎都是区别。
作用主要區別是什么呢?
用不用有 .net框架
引用
用不用有 .net框架
.net可否理解為Ł ......
Private Sub Command1_Click()
Dim m As Integer '接受文本框一的数值
Dim n As Integer '接受文本框二的数值
Dim k As Integ ......
这段程序中
Begin VB.Forms_frmmain BorderStyle = 1 'fixed single
Caption = "速算24"
clientHeight = 6375
clientLeft = 154 ......