|
我窗体中用SourceObject动态引用了A窗体,在对A窗体进行数修改后,保存出错。下面红色这句该怎么修改呢?
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![C区县]) = True Then
MsgBox "“区县”必填项", vbOKOnly, "提示"
Me![C区县].SetFocus
Else
Rs.MoveFirst
For i = 1 To Rs.RecordCount
If Rs("序号") = Forms![导航窗体]![A窗体]![序号] Then提示错误内容是:“找不到A窗体”
|
|