Hyperlinking to AutoCAD

  • Thread starter SteelFire via AccessMonster.com
  • Start date
S

SteelFire via AccessMonster.com

I have a database of parts that my company has made. The CAD files are stored
in one of two different places in the network. As of now, this is what I have:

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Private Sub FilePath_Click()
On Error GoTo Err_Handler

'Start of Body of Procedure***********************************
SavedPointer = Screen.MousePointer
Screen.MousePointer = 11
Call GoHyperlink("\\Mainstorage\mainstorage\CURRENT JOBS\" & Me.
[FilePath] & ".dwg")
Call GoHyperlink("\\Mainstorage\mainstorage\OLD JOBS\" & Me.[FilePath]
& ".dwg")
Screen.MousePointer = SavedPointer
'End of Body of Procedure***********************************

Exit_Handler:
Exit Sub
Err_Handler:
Call LogError(Err.Number, Err.Description, "FilePath_Click from
Form_frmPartList")
Resume Exit_Handler
End Sub
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Any time I click, it will open the file in AutoCAD and come up with an error.
This is because the file will work with the first Call GoHyperlink, or the
second, and error with the other. I was thinking if there would be a way to
look at the value of the Me.FilePath and use that as an IF-Then. all the
FilePath's have the year as the first four digits. I am unsure as to how I
would go about doing this. Any help with how to do this or any other way to
go about it would be nice.
 
P

Piet Linden

I have a database of parts that my company has made. The CAD files are stored
in one of two different places in the network. As of now, this is what I have:

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Private Sub FilePath_Click()
    On Error GoTo Err_Handler

    'Start of Body of Procedure***********************************
        SavedPointer = Screen.MousePointer
        Screen.MousePointer = 11
        Call GoHyperlink("\\Mainstorage\mainstorage\CURRENT JOBS\" & Me.
[FilePath] & ".dwg")
        Call GoHyperlink("\\Mainstorage\mainstorage\OLD JOBS\" & Me.[FilePath]
& ".dwg")
        Screen.MousePointer = SavedPointer
    'End of Body of Procedure***********************************

Exit_Handler:
    Exit Sub
Err_Handler:
    Call LogError(Err.Number, Err.Description, "FilePath_Click from
Form_frmPartList")
    Resume Exit_Handler
End Sub
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Any time I click, it will open the file in AutoCAD and come up with an error.
This is because the file will work with the first  Call GoHyperlink, orthe
second, and error with the other. I was thinking if there would be a way to
look at the value of the Me.FilePath and use that as an IF-Then. all the
FilePath's have the year as the first four digits. I am unsure as to how I
would go about doing this. Any help with how to do this or any other way to
go about it would be nice.

use
IsNumeric(Left$(FilePath,4)) Then...
 
S

SteelFire via AccessMonster.com

I made some changes, and things are still not working. I did this because the
files are split by 1999 and older and 2000 and newer. Any more ideas. Oh, and
the full URL that you posted didnae come out.
=========================================================================
Private Sub FilePath_Click()
On Error GoTo Err_Handler

'Start of Body of Procedure***********************************
SavedPointer = Screen.MousePointer
Screen.MousePointer = 11
Set FP = Left(Me.FilePath, 4)
If FP <= 1999 Then
Call GoHyperlink("\\Mainstorage\mainstorage\OLD JOBS\" & Me.
[FilePath] & ".dwg")
Else
Call GoHyperlink("\\Mainstorage\mainstorage\CURRENT JOBS\" &
Me.[FilePath] & ".dwg")
End If
Screen.MousePointer = SavedPointer
Call MsgBox("If any part of the file was changed, please update this
record and make the changes here as well", vbQuestion Or vbDefaultButton1,
"Anything Changed?")

'End of Body of Procedure***********************************

Exit_Handler:
Exit Sub
Err_Handler:
Call LogError(Err.Number, Err.Description, "FilePath_Click from
Form_frmPartList")
Resume Exit_Handler
End Sub
=========================================================================


Piet said:
I have a database of parts that my company has made. The CAD files are stored
in one of two different places in the network. As of now, this is what I have:
[quoted text clipped - 31 lines]
use
IsNumeric(Left$(FilePath,4)) Then...
 
S

SteelFire via AccessMonster.com

When I click, I get Error 13: Type mismatch
I made some changes, and things are still not working. I did this because the
files are split by 1999 and older and 2000 and newer. Any more ideas. Oh, and
the full URL that you posted didnae come out.
=========================================================================
Private Sub FilePath_Click()
On Error GoTo Err_Handler

'Start of Body of Procedure***********************************
SavedPointer = Screen.MousePointer
Screen.MousePointer = 11
Set FP = Left(Me.FilePath, 4)
If FP <= 1999 Then
Call GoHyperlink("\\Mainstorage\mainstorage\OLD JOBS\" & Me.
[FilePath] & ".dwg")
Else
Call GoHyperlink("\\Mainstorage\mainstorage\CURRENT JOBS\" &
Me.[FilePath] & ".dwg")
End If
Screen.MousePointer = SavedPointer
Call MsgBox("If any part of the file was changed, please update this
record and make the changes here as well", vbQuestion Or vbDefaultButton1,
"Anything Changed?")

'End of Body of Procedure***********************************

Exit_Handler:
Exit Sub
Err_Handler:
Call LogError(Err.Number, Err.Description, "FilePath_Click from
Form_frmPartList")
Resume Exit_Handler
End Sub
=========================================================================
On May 15, 11:35 am, "SteelFire via AccessMonster.com" <u51054@uwe>
wrote:
[quoted text clipped - 6 lines]
use
IsNumeric(Left$(FilePath,4)) Then...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top