I don't want to specify a certain program as sometimes it is a PDF and other times the file could be a JPG.
The structure of the database:
DATA FROM THE FIRST TABLE
TABLE: Listings
FIELD: Property Root Folder ***This is a path like "C:\6850 Dustin Circle\"
COMMON FIELD: Listing ID ***This is a Numeric Field)
DATA FROM THE SECOND TABLE WHICH THE FORM IS BASED ON
TABLE: Valuations
FIELD: Valuation Link ***This is a file name like "10630 South 27th Street - BPO.PDF"
COMMON FIELD: Listing ID
This is what I have so far:
Code:
Private Sub BPO_Click()
Dim r As Variant
Dim strRootPath As String
If Dir(Me![Valuation Link], vbDirectory) <> "" Then
strRootPath = DLookup("Listings![Property Root Folder]", "Listings", "ListingID=ListingID")
strRootPath = strRootPath & Me.[Valuation Link]
Debug.Print strRootPath ' what does this show??
r = Shell("Explorer.exe " & strRootPath)
End If
End Sub
I receive no error and nothing appears to happen.