|
Option Compare Database
Private Sub 保存_Click()
On Error GoTo Err_保存_Click
Dim i As Integer
Dim STemp As String
Dim Rs As ADODB.Recordset
Set Rs = New ADODB.Recordset
STemp = "Select * From 选址派单"
Rs.Open STemp, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If IsNull(Me![选址派单]) = True Then
MsgBox "带*号文本框不能为空", vbOKOnly, ""
Me![选址派单].SetFocus
Else
Rs.MoveFirst
For i = 1 To Rs.RecordCount
If Rs("站址编号") = Me![选址派单子窗体]![站址编号] Then
Rs("运营商提供站名") = Me![运营商提供站名]
Rs("所属运营商") = Me![所属运营商]
Rs("电信批次") = Me![电信批次]
Rs("移动批次") = Me![移动批次]
Rs("联通批次") = Me![联通批次]
Rs("区域") = Me![区域]
Rs("乡镇名称") = Me![乡镇名称]
Rs("经度") = Me![经度]
Rs("纬度") = Me![纬度]
Rs("建设方式") = Me![建设方式]
Rs("选址派单") = Me![选址派单]
Rs.Update
Me![选址派单子窗体].Requery
MsgBox "信息修改完成!", vbOKOnly, ""
Exit Sub
Else
Rs.MoveNext
End If
Next i
End If
Set Rs = Nothing
Exit_保存_Click:
Exit Sub
Err_保存_Click:
MsgBox Err.Description
Resume Exit_保存_Click
End Sub |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|