I am making a db to use for my work. We have some files in a folder, Excel, Word and PDF. I have a table that holds (FORMID, FORMNAME, FORMLOCATION, FORMTYPE) [form type I put there in case I have to do select case code for different options in opening code for different filetypes.
Anyway, I currently use this code to view my files.
Code:
'Open a form to view
Dim strInput As String
strInput = DLookup("[FORMLOCATION]", "FORMtbl", "[FORMID] = " & FORMLOCATION.Value)
Application.FollowHyperlink strInput, , True
GetUserAddress = True
The above code works great, it just opens the file. Use this just so when people don't remember the file they need they can view without printing. But for those instances where you know for sure you want to print a particular file, I just want to be able to use the dropdown (FORMLOCATION) and click the button (PRINTbtn) and it prints. I've searched for hours and have found nothing that works. Although I've tried several bits of code, I'm always running into errors I can't figure out.
Any help would be greatly appreciated.
v/r
Snayjay