Hi Carva,
Heres the code I always use when opening external files from VB and it should also work in Access. It uses the windows API shellexecute which basicaly just tells windows to load the file with whatever program is associated with the extension (it's the same as typing something into the RUN box in windows).
#################################################
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_NORMAL = 1
Const SW_HIDDEN = 2
Const SE_ERR_FNF = 2&
Const SE_ERR_PNF = 3&
Const SE_ERR_ACCESSDENIED = 5&
Const SE_ERR_OOM = 8&
Const SE_ERR_DLLNOTFOUND = 32&
Const SE_ERR_SHARE = 26&
Const SE_ERR_ASSOCINCOMPLETE = 27&
Const SE_ERR_DDETIMEOUT = 28&
Const SE_ERR_DDEFAIL = 29&
Const SE_ERR_DDEBUSY = 30&
Const SE_ERR_NOASSOC = 31&
Const ERROR_BAD_FORMAT = 11&
Public Function LoadExternalFile(Program As String, StartPath As String)
Dim Result, Message As String
Result = ShellExecute(0&, vbNullString, Program, vbNullString, StartPath, 1)
Select Case Result
Case SE_ERR_FNF
Message = "The specified file was not found"
Case SE_ERR_PNF
Message = "The specified path was not found"
Case SE_ERR_ACCESSDENIED
Message = "The operating system denied access to the specified file"
Case SE_ERR_OOM
Message = "The operating system is out of memory or resources"
Case SE_ERR_DLLNOTFOUND
Message = "The specified dynamic-link library was not found"
Case SE_ERR_SHARE
Message = "A sharing violation occurred, make sure no one else is using the file"
Case SE_ERR_ASSOCINCOMPLETE
Message = "The filename association is incomplete or invalid"
Case SE_ERR_DDETIMEOUT
Message = "The DDE transaction could not be completed because the request timed out"
Case SE_ERR_DDEFAIL
Message = "The DDE transaction failed"
Case SE_ERR_DDEBUSY
Message = "The DDE transaction could not be completed because other DDE transactions were being processed"
Case SE_ERR_NOASSOC
Message = "There is no application associated with " & Format(Right(Program, 3), ">") & " extensions"
Case ERROR_BAD_FORMAT
Message = "The EXE file is invalid (non-Win32 EXE or error in EXE image)"
End Select
If Result < 32 Then MsgBox Message, vbInformation + vbOKOnly, "Unable to Load File"
End Function
#################################################
Sindo