程序代码:
Dim CodeData() As String Private Sub Command1_Click() Dim i As Integer, j As Integer j = 0 For i = 0 To Check1.Count - 1 If Check1(i).Value = 1 Then ReDim Preserve CodeData(j) CodeData(j) = j + 1 & "," & Check1(i).Name & "," & "1" '后面这个1~有没有没啥差~看你后面Database怎Updata j = j + 1 End If Next i If j < 4 Then Call Updata2DataBase Else ReDim CodeData(0) Call Init MsgBox "Check Too More..." End If End Sub Private Sub Form_Initialize() ReDim CodeData(0) End Sub Private Sub Form_Load() Dim i As Integer For i = 0 To Check1.Count - 1 Check1(i).Value = 0 Next i End Sub Private Sub Init() Dim i As Integer For i = 0 To Check1.Count - 1 Check1(i).Value = 0 Next i End Sub Private Sub Updata2DataBase() MsgBox "Connect to Database !" '这之后我就不熟了~待高手补上~ End Sub
[ 本帖最后由 wube 于 2011-6-7 17:11 编辑 ]