So you say you have a table (pdfFolder) like,
ID | folderPath
---+------------
1 | C:\Temp\
2 | D:\Test\
3 | E:\Sales\
With your DLookup, the value in varFolder should be "D:\Temp\".
If the answer is 'Yes', then what is your problem? If the answer is 'No', what is your problem?