dim i ,a for i=1 to xxx a=date b=1+00001 combo1.additem right(cint(cstr(a)+cstr(b,5))) next
错了 应该是 dim i ,a for i=1 to xxx a=date b=1+00001 combo1.additem cint(cstr(a)+right(cstr(b,5))) next
Dim SN As String SN = "00001" 'SN原来值为 "00001"SN = Format(CInt(SN) + 1, "00000") '执行该句后SN值为"00002"给分吧!!!!! 有什么问题可以继续问我!
Private Sub Form_Load() Text1.Text = "00001" End Sub Private Sub Command1_Click() '执行该句后Text1.Text值为"00002" Text1.Text = Format(Val(Text1.Text) + 1, "00000") End Sub
xxlroad(土八路) ,你抄袭,呵呵呵呵!!!!!!
数据库么? select max(isnull(id,0))+1 from T '加这这个就不会在没有记录时出错 然后自己补0
同意: lovendreams(爱拼才会赢)
Dim SN As String SN = "00001" 'SN原来值为 "00001"SN = Format(CInt(SN) + 1, "00000") '执行该句后SN值为"00002"抄袭
设个变量,然后 i=i+1
怎样?有问题吗?
for i=1 to xxx
a=date
b=1+00001
combo1.additem right(cint(cstr(a)+cstr(b,5)))
next
应该是
dim i ,a
for i=1 to xxx
a=date
b=1+00001
combo1.additem cint(cstr(a)+right(cstr(b,5)))
next
SN = "00001" 'SN原来值为 "00001"SN = Format(CInt(SN) + 1, "00000") '执行该句后SN值为"00002"给分吧!!!!!
有什么问题可以继续问我!
Text1.Text = "00001"
End Sub
Private Sub Command1_Click()
'执行该句后Text1.Text值为"00002"
Text1.Text = Format(Val(Text1.Text) + 1, "00000")
End Sub
select max(isnull(id,0))+1 from T '加这这个就不会在没有记录时出错
然后自己补0
Dim SN As String
SN = "00001" 'SN原来值为 "00001"SN = Format(CInt(SN) + 1, "00000") '执行该句后SN值为"00002"抄袭
MyStr = Format(5459.4, "##,##0。00") ' 返回 "5,459.40"。
MyStr = Format(334。9, "###0。00") ' 返回 "334.90"。MyStr = Format(5, "0。00%") ' 返回 "500.00%"。
MyStr = Format("HELLO", "<") ' 返回 "hello"。
MyStr = Format("This is it", ">") ' 返回 "THIS IS IT"