|
Private Sub cmdOK_Click()
Dim strSQL As String
Dim rst As ADODB.Recordset
If IsNull(txtCureStep) Then
MsgBox "治疗步骤没有填写!"
txtCureStep.SetFocus
Exit Sub
End If
If IsNull(cboType) Then
MsgBox "类别必须选择!"
cboType.SetFocus
Exit Sub
End If
strSQL = "select * from tblCureStep where Type ='" & Trim(txtID) & "'"
Set rst = New ADODB.Recordset
rst.Open strSQL, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
With rst
If Not .EOF Then
![CureStep] = txtCureStep
![Type] = cboType
.Update
End If
End With
rst.Close
Set rst = Nothing
' Forms("frmCureStep")!subCureStep.Form.Requery
DoCmd.Close acForm, Me.Name
End Sub |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|