automated click

aha! i got this working....check it out....

Option Compare Database
Option Explicit

Function FileOrDirExists(PathName As String) As Boolean

Dim iTemp As Integer

On Error Resume Next
iTemp = GetAttr(PathName)

Select Case Err.Number
Case Is = 0
FileOrDirExists = True
Case Else
FileOrDirExists = False
End Select

On Error GoTo 0
End Function
Private Sub Form_Load()
Dim rs As adodb.Recordset
Do While Not Recordset.EOF
Dim sPath As String
sPath = "N:\DRAWINGS\" & [Drawing#] & "-01_" & [DwgRev] & ".dwg"
If FileOrDirExists(sPath) Then
[Verify] = True
Else
MsgBox sPath & " does not exist."
End If
Recordset.MoveNext
Loop

End Sub
 
Cool! Glad you got that working. Also, I learned something today. I have never used the Recordset property in that fashion before so you taught me something!
 

Users who are viewing this thread

Back
Top Bottom