至少一个参数没有被指定值
Private Sub ChangeMvc_Click() '修改调动信息
Dim rs As New ADODB.Recordset
flag = 2
TurnInfo.Caption = "修改员工调动信息"
If TurnInfoRS.DataGrid1.Row < 0 Then
MsgBox "目前没有记录!", vbOKOnly + vbExclamation, "提示!"
flag = 1
TurnInfo.Show
TurnInfo.ZOrder 0
Else
str1 = "select * from 改变信息 where ID=" & Trim( _
TurnInfoRS.DataGrid1.Columns(0))
TurnInfo.ID = Trim(TurnInfoRS.DataGrid1.Columns(0))
Set rs = TransactSQL(str1)
If rs.EOF = False Then
With rs
TurnInfo.AID = rs(1)
TurnInfo.YGName = rs(2)
TurnInfo.OldDept = rs(3)
TurnInfo.NewDept = rs(4)
TurnInfo.OldPS = rs(5)
TurnInfo.NewPS = rs(6)
TurnInfo.OutTime = rs(7)
TurnInfo.InTime = rs(8)
TurnInfo.Remark = rs(9)
End With
rs.Close
End If
TurnInfo.Show
TurnInfo.ZOrder 0
End If
End Sub
就提示至少一个参数没有被指定值这句错误
[解决办法]
检查一下,某个字段名写错了
[解决办法]
str1 = "select * from 改变信息 where ID=" & Trim( _
TurnInfoRS.DataGrid1.Columns(0))
TurnInfo.ID = Trim(TurnInfoRS.DataGrid1.Columns(0))
这样可以吗...
TurnInfoRS.DataGrid1.Columns(0)??
[解决办法]
不可以,改为TurnInfoRS.DataGrid1.Columns(0).TOSTRING.TRIM