4 replies
by dlester Accepted solution
by tony hopkinson Accepted solution
by dlester Accepted solution
by tony hopkinson Accepted solution
pop this waffle at the top of the form code.
Public 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 Integer) As Long
How you want to do the UI is much of a muchness. but one way would be to add a button "View Drawing" then in it's commnd? (I'm a bit out of date in access)
ShellExecute(0&,"open","c:\MyCADSoftware.exe",DrawingFileName,"C:\MyCADSoftware\Drawings",5)
Hope this helps
PS If you have a file association set up for the drawing files to your cad software.
ShellExecute(0&,"open",DrawingFileName,VBNullString,"C:\MyCADSoftware\Drawings",5)
Means you don't have to hard code where CAD is installed.
Above assumes drawingfilename from the query has the extension in it, otherwise you'll have to bolt that on say DrawingFileName + ".CAD"
Also if drawingfilename happens to be the full path, you don't need teh start directory, that though means a bit of messing about if you ever relocate your drawing files.
This discussion is closed to new replies.
Trending Software posts
Sort by Trending