This actually just opens up My Documents for some reason. If I take out
Private Sub Command110_Click()
Dim RetVal As Long
Dim TaskID As Variant
Dim FullFilePath As String
Dim strFileName As String
On Error Resume Next
If Not IsNull(Me.Document) Then
FullFilePath = "G:\Finance\Leases\Scanned Leases\" & [Me.PropertyID] & "*.pdf"
RetVal = apiShellExecute(hWndAccessApp, "open", FullFilePath, vbNullString, vbNullString, vbNormalFocus)
If RetVal = 0 Then '0 indicates not enough memory
MsgBox "The operating system is out of memory or resources.", vbExclamation, "File Open Failure"
ElseIf RetVal = 2 Then '2 indicates that the file was not found
MsgBox "The specified file was not found.", vbExclamation, "File Open Failure"
ElseIf RetVal = 3 Then '3 indicates that the path was not found
MsgBox "The specified path was not found.", vbExclamation, "File Open Failure"
ElseIf RetVal = 11 Then '11 indicates that the executable is corrupted
MsgBox "The .exe file is invalid (non-Win32 .exe or error in .exe image).", vbExclamation, "File Open Failure"
ElseIf RetVal = 31 Then 'If the association is missing, then use Shell to try the OpenWith dialog
TaskID = Shell("rundll32.exe shell32.dll,OpenAs_RunDLL " & FullFilePath, vbNormalFocus)
ElseIf RetVal <= 32 Then 'the apishellexecute function returns a value greater than 32 on success
MsgBox "File could not be opened. Error number " & CStr(RetVal), vbExclamation, "File Open Failure"
MsgBox "No file location entered!", vbExclamation, "Can not open file"