D
Daniel Pineault
Here try this:
Function OpenImage(sFileFullPathAndName)
On Error GoTo Error_Handler
Shell Chr(34) & "C:\Windows\System32\mspaint.exe" & Chr(34) & " " & _
Chr(34) & sFileFullPathAndName & Chr(34), 1
If Err.Number = 0 Then Exit Function
Error_Handler:
MsgBox "MS Access has generated the following error" & vbCrLf & vbCrLf &
"Error Number: " & _
Err.Number & vbCrLf & "Error Source: OpenImage" & vbCrLf & "Error
Description: " & _
Err.Description, vbCritical, "An Error has Occured!"
Exit Function
End Function
You simply call it like so:
OpenImage("D:\Main\My Documents\My Pictures\Portrait.jpg")
--
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
Function OpenImage(sFileFullPathAndName)
On Error GoTo Error_Handler
Shell Chr(34) & "C:\Windows\System32\mspaint.exe" & Chr(34) & " " & _
Chr(34) & sFileFullPathAndName & Chr(34), 1
If Err.Number = 0 Then Exit Function
Error_Handler:
MsgBox "MS Access has generated the following error" & vbCrLf & vbCrLf &
"Error Number: " & _
Err.Number & vbCrLf & "Error Source: OpenImage" & vbCrLf & "Error
Description: " & _
Err.Description, vbCritical, "An Error has Occured!"
Exit Function
End Function
You simply call it like so:
OpenImage("D:\Main\My Documents\My Pictures\Portrait.jpg")
--
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.