Opening File based on Directory Location, Part & CAD Numbers

skilche1

Registered User.
Local time
Today, 11:30
Joined
Apr 29, 2003
Messages
226
When creating an incoming inspection database, I want to set it up so when I am in a form to add data, I want to have a command button where I can pull up the associated CAD drawing based on part number and drawing number. I would like to enter the directory location into a table so I could change it if I need to.

So basically I want to go something like this:

.tblDirctoryLocation
txtDirectory

.tblProduct
txtProductName
txtProductNumber
txtProductCADNo

These tables would not be related to one another as there will only be one record for the directory location and multiple records for products.

Somehow I want the db to assemble file location like this:
“E\Quality_Directory\Incoming” & “ProductNumber_” & “CADDrawing” & “.pdf”
End result: E\Quality_Directory\Incoming\ProductNumber_CADDrawing.pdf



Is there any way this could be done?
 
Simplest method may be like the following example:
Code:
Sub Open_jpeg()
      Dim str As String
10    str = "D:\PatPictures\2011-Mar\"
20    Application.FollowHyperlink str & "DSCF5330.jpg"
End Sub

Adjust names as necessary and use the Application.FollowHyperlink construct.

Good luck.
 

Users who are viewing this thread

Back
Top Bottom