计算机毕业设计介绍:
以下是引用片段:
实现功能的关键代码为: Private Sub MMButton_XPBE2_Click() Dim strresult As String If Me.txtID.Enabled = True Then '添加社区信息 If Me.txtID.Text = "" Or Me.txt1.Text = "" Then MsgBox "社区代码或社区名称不能为空" Exit Sub End If If ExecSql("select * from sqxx where sqdm='" & Trim(Me.txtID.Text) & "'").RecordCount > 0 Then MsgBox "社区代码重复,不能保存!" Exit Sub End If strresult = Exec_SqL("insert into sqxx(sqdm, sqmc, sqbz) " _ & " values('" & Trim(Me.txtID.Text) & "','" & Trim(Me.txt1.Text) & "','" & Me.txt4.Text & "')") If strresult <> "OK" Then MsgBox strresult Exit Sub End If Call frmSQWH.UpdateList Else '修改社区信息 If Me.txt1.Text = "" Then MsgBox "社区名称不能为空" Exit Sub End If strresult = Exec_SqL("update sqxx set sqmc='" & Trim(Me.txt1.Text) & "'," _ & " sqbz ='" & Me.txt4.Text & "' where " _ & " sqdm ='" & Trim(Me.txtID.Text) & "'") If strresult <> "OK" Then MsgBox strresult Exit Sub End If Call frmSQWH.UpdateList End If log = InsertOperateLog("编辑社区信息", "成功") Unload Me End Sub
|
〖资料来源:计算机毕业论文 www.xiaoniu168.com〗
第8页为计算机毕业论文部分......