请教高手~数据保存到一定数据就会出错
数据库怎么保存到一定数据的时候程序就会出错~代码如下:If newFlag = 0 Then '如果是新记录
Call OpenConn
SQL = "select * from 基础档案表"
rs.Open SQL, cn, 3, 3
rs.AddNew
For I = 0 To 31
rs.Fields(I + 1) = Me.text1(I).Text
Next
rs!建档人 = Me.text1(32).Text
rs!像片 = phoPath
rs.Update
Call CloseConn
phoPath = "" '清空像片路径
Me.Frame1.Enabled = False
MsgBox "记录添加成功!", 64, "提示"
Me.Toolbar1.Buttons(1).Enabled = True
Me.Toolbar1.Buttons(3).Enabled = False
Else '如果是修改记录
Call OpenConn
SQL = "select * from 基础档案表 where zgid=" & gXhcd
rs.Open SQL, cn, 3, 3
For I = 0 To 31
rs.Fields(I + 1) = Me.text1(I).Text 这句就会出错
Next
rs!建档人 = gCzy
rs!像片 = phoPath
rs.Update