|
Private Sub ComboOrgUnit_DblClick(Cancel As Integer)
Dim UnitName As String, UnitList As String
Dim rst As New ADODB.Recordset
UnitName = InputBox("请输入要增加的部门名称:")
rst.Open "OrgUnitName", CurrentProject, adOpenDynamic, adLockOptimistic
If rst.Supports(adAddNew) Then
With rst
.AddNew
.Fields("unitname").Value = UnitName
.Update
End With
End If
rst.Close
Set rst = Nothing
Me.ComboOrgUnit.Requery
End Sub
运行到这段代码的时候提示"参数类型不正确,或不在可接受的范围之内,或与其它参数冲突",是错在哪里啊?? |
|