On Error GoTo errors
Dim pathstr As String
DoEvents
If mintcount <> Adodc1.Recordset.AbsolutePosition Then textmask.Visible = False
pathstr = Form1.Adodc1.Recordset.Fields("path")
'此处获得所要数据
If pathstr = "" Then GoTo errors
If LCase(Right(RTrim(pathstr), 4)) = ".txt" Then
gstrpath = App.Path & "\text\" & pathstr
Else
gstrpath = App.Path & "\text\" & pathstr & ".txt"
End If
If Dir(gstrpath) = "" Then MsgBox "此部分内容联接错误,请确认文件名(" & pathstr & ".txt)正确!", vbCritical: GoTo errors
Form2.Show
Timer2.Enabled = False
'Unload Me
errors:
textmask.Visible = False
Exit Sub
End Sub