P
punjab_tom
hello.. my name is Tom. I am new here; I just started with access.
I want to find out what I am doing wrong with this code... I want to
launch a DOS window with a filter on DIR to give me a list - in DOS- of
the correct files.
When I take this command into a BAT file it works great.. only when I
send it to the SHELL command in Access does it give me trouble.. it
only says '53 - file not found'
When I stop it through this and i check strShell it gives me this
?strShell
DIR "C:\TOM\RDL\*disenrollment*.RDL" /B
Thank you for your patience
Tom
--------------------------------
Private Sub cmdFind_RdlPath_Click()
On Error GoTo errHandler
Dim strShell As String
strShell = "DIR " & Chr(34) & "C:\TOM\RDL\*" &
Trim(GetLongestWord(Me.LetterFormName)) & "*.RDL" & Chr(34) & " /B"
Call Shell(strShell, vbNormalFocus)
cleanExit:
Exit Sub
errHandler:
MsgBox Err.Number & " - " & Err.Description, vbOKOnly
Resume Next
End Sub
I want to find out what I am doing wrong with this code... I want to
launch a DOS window with a filter on DIR to give me a list - in DOS- of
the correct files.
When I take this command into a BAT file it works great.. only when I
send it to the SHELL command in Access does it give me trouble.. it
only says '53 - file not found'
When I stop it through this and i check strShell it gives me this
?strShell
DIR "C:\TOM\RDL\*disenrollment*.RDL" /B
Thank you for your patience
Tom
--------------------------------
Private Sub cmdFind_RdlPath_Click()
On Error GoTo errHandler
Dim strShell As String
strShell = "DIR " & Chr(34) & "C:\TOM\RDL\*" &
Trim(GetLongestWord(Me.LetterFormName)) & "*.RDL" & Chr(34) & " /B"
Call Shell(strShell, vbNormalFocus)
cleanExit:
Exit Sub
errHandler:
MsgBox Err.Number & " - " & Err.Description, vbOKOnly
Resume Next
End Sub