|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Private Sub CommandButton1_Click() '保存记录
If MsgBox("本操作将保存名为<" & 企业名称.Value _
& ">的借款人贷款卡信息!" & vbCrLf & "是否要继续?", _
vbQuestion + vbYesNo, "保存记录") = vbNo Then Exit Sub
On Error GoTo myerr
'----修改更新贷款卡信息记录----
SQL = "update 发卡数据库 set " _
& "组织代码='" & 组织代码.Value & "'," _
& "企业名称='" & 企业名称.Value & "'," _
& "企业类型='" & 企业类型.Value & "'," _
& "行业分类='" & 行业分类.Value & "'," _
& "企业地址='" & 企业地址.Value & "'," _
& "企业电话='" & 企业电话.Value & "'," _
& "企业法人='" & 企业法人.Value & "'," _
& "受理日期=#" & 受理日期.Value & "#," _
& "受理编号='" & 受理编号.Value & "'," _
& "核准日期=#" & 核准日期.Value & "#," _
& "核准编号='" & 核准编号.Value & "'," _
& "贷款卡号='" & 贷款卡号.Value & "'," _
& "登记号='" & 登记号.Value & "' " _
& "最新年审日期=#" & 最新年审日期.Value & "#," _
& "最新合格日期=#" & 最新合格日期.Value & "#," _
& "初审银行='" & 初审银行.Value & "' " _
& "where 企业名称='" & 企业名称.Value & "'"
Set rs = New ADODB.Recordset
rs.Open SQL, cnn, adOpenKeyset, adLockOptimistic
MsgBox "已经成功将名为<" & 企业名称.Value _
& ">的贷款卡信息记录进行保存!", vbInformation, "保存记录"
myerr:
Exit Sub
End Sub
我想通过以上把数据保存到“发卡数据库”,执行后出现以下提示: |
|