adoRS.Open "select count(I_id) as c from inputrp",cn if not adors.eof then RowsInTable = adoRS.Fields("c") IID = "I" & Format(RowsInTable + 1, "000000000") txtinputID.Text = IID else '.... end if adoRS.Close
End Sub
'补充一点Private Sub SetInputID() '设置商品ID号
adoRS.Open "select count(I_id) as c from inputrp",cn if not adors.eof then if isNull(adoRS.Fields("c")) then RowsInTable="" else RowsInTable = adoRS.Fields("c") end if
IID = "I" & Format(RowsInTable + 1, "000000000") txtinputID.Text = IID else '.... end if adoRS.Close
Private Sub SetInputID() '设置商品ID号
adoRS.Open ("select count(I_id) from inputrp")
RowsInTable = adoRS.Fields(0)
IID = "I" & Format(RowsInTable + 1, "000000000")
txtinputID.Text = IID
adoRS.Close
End Sub
adoRS.Open "select count(I_id) as c from inputrp",cn
if not adors.eof then
RowsInTable = adoRS.Fields("c")
IID = "I" & Format(RowsInTable + 1, "000000000")
txtinputID.Text = IID
else
'....
end if
adoRS.Close
End Sub
adoRS.Open "select count(I_id) as c from inputrp",cn
if not adors.eof then
if isNull(adoRS.Fields("c")) then
RowsInTable=""
else
RowsInTable = adoRS.Fields("c")
end if
IID = "I" & Format(RowsInTable + 1, "000000000")
txtinputID.Text = IID
else
'....
end if
adoRS.Close
End Sub