We have an MS Access application for the CNC Machine Department
They use it to keep tranck of their CAD Files.
I have a function that allows them to open a CAD File by double clicking the
record by launching a expecific software wich shortcut i have it on a
table called "Local_Settings"
But they have upgrade their CAD Software now we have files with MC8, MC9 and
MC10 file extencions.
The function works fine when they open a file with the MC8 extension but as
you can see they have 3 diferent file extensions now.
Function ShowMasterCam()
On Error GoTo Err_ShowMasterCam
Dim FName As String, TP As String
FName = Screen.ActiveForm.Name
Select Case FName
Case "Main"
TP = [Forms]![Main]![MainSub].[Form]![Path] & ".mc8"
If ExitsFile(TP) = "True" Then
GoTo TL
Else
GoTo TR
End If
Case "Tickets"
TP = Forms![Tickets]![TicketsLines].Form![Path] & "\" &
Forms![Tickets]![TicketsLines].Form![MachineCode] &
Forms![Tickets]![TicketsLines].Form![Program] & ".mc8"
If ExitsFile(TP) = "True" Then
GoTo TL
Else
GoTo TR
End If
Case Else
Exit Function
End Select
TL:
TShell = DLookup("[Value]", "Local_Settings", "[ID]=" & 4) & " " & TP
Call Shell(TShell, 1)
Exit Function
TR:
Responce = MsgBox("File not found or non existing", vbCritical +
vbOKOnly, CiaName())
Exit Function
Exit_ShowMasterCam:
Exit Function
Err_ShowMasterCam:
If Err.Number = 2475 Or Err.Number = 2465 Then
Responce = MsgBox("Wrong Window", vbCritical + vbOKOnly, CiaName())
Exit Function
Else
MsgBox Err.Description & " Error Number: " & Err.Number
Resume Exit_ShowMasterCam
End If
End Function