E
Erik Svensson
Hi
I am trying to create a drawing database for our AutoCAD drawings and I want
to create a button that opens up a specific drawing when it is found by a
search query. When I try to have this VBA code the error message "Microsoft
Office Access can't find the field 'Open type' referred to in your
expression". I have checked in the control panel and the .dwg ending is
assigned to AutoCAD. Can anyone help me with this problem?
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
Dim stAppNameSTANDARD As String
Dim stAppNameCUSTOM As String
stAppNameSTANDARD = "G:\data\DRAWINGS\F600000-F609999 STANDARD PANELS\"
& Forms![Drawing search form]![Open drawing]
stAppNameCUSTOM = "G:\data\DRAWINGS\F680000-F689999\" & Forms![Drawing
search form]![Open drawing]
If Forms![Drawing search form]![Open type] = "STANDARD" Then
Application.FollowHyperlink (stAppNameSTANDARD)
If Forms![Drawing search form]![Open type] = "CUSTOM" Then
Application.FollowHyperlink (stAppNameCUSTOM)
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub
Thanks
/Erik Svensson
I am trying to create a drawing database for our AutoCAD drawings and I want
to create a button that opens up a specific drawing when it is found by a
search query. When I try to have this VBA code the error message "Microsoft
Office Access can't find the field 'Open type' referred to in your
expression". I have checked in the control panel and the .dwg ending is
assigned to AutoCAD. Can anyone help me with this problem?
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
Dim stAppNameSTANDARD As String
Dim stAppNameCUSTOM As String
stAppNameSTANDARD = "G:\data\DRAWINGS\F600000-F609999 STANDARD PANELS\"
& Forms![Drawing search form]![Open drawing]
stAppNameCUSTOM = "G:\data\DRAWINGS\F680000-F689999\" & Forms![Drawing
search form]![Open drawing]
If Forms![Drawing search form]![Open type] = "STANDARD" Then
Application.FollowHyperlink (stAppNameSTANDARD)
If Forms![Drawing search form]![Open type] = "CUSTOM" Then
Application.FollowHyperlink (stAppNameCUSTOM)
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub
Thanks
/Erik Svensson