Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View PDF Files from Ms Access Form

Status
Not open for further replies.

papic1972

Technical User
Apr 10, 2003
209
AU
Hi All,

I store PDF copies of all invoices that are printed from an access form in a folder 'C:\Invoices'. I have had a look at & used the method (of creating a form that lists files in a folder) devised by Allen Browne called 'Listbox recursive list files' which is found here:
& it is quite good, but it is missing one final part that i'm looking for.

I name my PDF files by a combination of the record number that it is generated from & 'CI'. For e.g, a PDF may be named as '43687CI'.

Referring to Allen's listbox example:
If i have a form that relates to record '43687' (for example), does anyone know how i can filter my listbox so it shows only '43687CI' & not all the PDF's stored in 'C:\Invoices'.
 
If this is a single invoice, why bother with Allen Browne's code at all?

[tt]Me.txtFileName= "C:\Invoices\" & Me.RecID & "CI.pdf"[/tt]

Then, in the click event:

Code:
If Dir(Me.txtFileName)<>"" Then
   FollowHyperlink & Me.txtFileName
Else
   'Missing
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top