johnlatona123
Innovator
- Local time
- Today, 05:02
- Joined
- Sep 20, 2011
- Messages
- 85
hi all,
i could use some help trying to combine this code together to occur as one on_load sub routine.
heres what we got:
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
_________________________________________-
Private Sub Form_Load2()
Dim rs As adodb.Recordset
Do While Not Recordset.EOF
Dim tPath As String
tPath = "N:\DRAWINGS\" & [Drawing#] & "-02_" & [DwgRev] & ".dwg"
If FileOrDirExists(tPath) Then
[verify2] = True
Else
MsgBox tPath & " does not exist."
End If
Recordset.MoveNext
Loop
End Sub
ive highlighted the sublte differences between the two subs to illustrate the difference in function.
so maybe im having a special moment here or something, but for whatever reason i cant get the second sub there to do anything at all, so i thought maybe if i combine the two together?
please help!
i could use some help trying to combine this code together to occur as one on_load sub routine.
heres what we got:
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
_________________________________________-
Private Sub Form_Load2()
Dim rs As adodb.Recordset
Do While Not Recordset.EOF
Dim tPath As String
tPath = "N:\DRAWINGS\" & [Drawing#] & "-02_" & [DwgRev] & ".dwg"
If FileOrDirExists(tPath) Then
[verify2] = True
Else
MsgBox tPath & " does not exist."
End If
Recordset.MoveNext
Loop
End Sub
ive highlighted the sublte differences between the two subs to illustrate the difference in function.
so maybe im having a special moment here or something, but for whatever reason i cant get the second sub there to do anything at all, so i thought maybe if i combine the two together?
please help!