HTML Code:
I can't pass dLookup value to foldername when using shell function.
dLookup gives me the proper value but when I run this code it gets me to This PC/Documents. If I remove from Foldername string "curTransX" and run it again I end up in the proper subdirectory.
If dLookup output is for example "shop 1-002" I am expecting to see path "\\myPathToFolder\shop 1-002" passed to function, what I am getting is "\\myPathToFolder\curTransX" when debug.print Foldername.
Wonder what I am doing wrong here?
Code:
Private Sub txtPIsoRev_DblClick(Cancel As Integer)
Dim Foldername As String
Dim curTransX As Variant
curTransX = DLookup("[CurTrans]", "[tbl_Piping]", "[PipIsoDwg] ='" & Me.txtPIsoDwg & "'")
'Debug.Print curTransX
Foldername = "\\myPathToFolder\curTransX"
Debug.Print Foldername
Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
End Sub