Public Sub safestore()
Dim myrecordset As New ADODB.Recordset, i As Integer
Set myrecordset = New ADODB.Recordset
myrecordset.Open "未办电报", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
myrecordset.MoveFirst
For i = 1 To myrecordset.RecordCount
MsgBox "请接班同志及时办理遗报:" & myrecordset("收电编号") & "!", vbOKOnly + vbExclamation, "遗报提示!"
myrecordset.MoveNext
Next i
End Sub
strCont = InputBox("请输入要查看的收电编号", "定位查询", Me.文本2)
If IsNull(strCont) Or strCont = "" Then
Exit Sub
Else
DoCmd.FindRecord strCont, , False, , True
End If