A PDF delima

C

Charlie O'Neill

A PDF delima.

I have a Home Owners Association database with over 2000 homes. Each home
is identified by neighborhood, street address, and owners name. I would like
to pull a user profile that is a PDF. The path to the PDF will vary with
each home owner. For example a path might be - \Sentry\Resident
Files\Whitehall\Wesley Street\2139\some.pdf.

In a form the user can display information on various homes by using a
combination of controls.

I would like to take the information displayed and create a hyperlink using
the Left, Mid and wildcard functions to display the proper PDF.

I do not want to create 2000 different hyperlinks.

Can it be done?

Charlie
 
B

Bob Quintal

=?Utf-8?B?Q2hhcmxpZSBPJ05laWxs?=
A PDF delima.

I have a Home Owners Association database with over 2000 homes.
Each home is identified by neighborhood, street address, and
owners name. I would like to pull a user profile that is a PDF.
The path to the PDF will vary with each home owner. For example a
path might be - \Sentry\Resident Files\Whitehall\Wesley
Street\2139\some.pdf.

In a form the user can display information on various homes by
using a
combination of controls.

I would like to take the information displayed and create a
hyperlink using the Left, Mid and wildcard functions to display
the proper PDF.

I do not want to create 2000 different hyperlinks.

Can it be done?

Charlie
if you have the path and filename as a field in your table, you can
format a textbox on the form to treat it as a hyperlink
 
A

Arvin Meyer MVP

Former MVP Steve Arbaugh created an addin called the PDF and Mail class that
is perfect for building and saving all 2000 of your PDFs in a single run of
the code:

http://www.groupacg.com/

It works with many differing PDF creators both free and paid, but the one I
find the fastest and easiest to code in Access VBA is Win2PDF:

http://www.win2pdf.com
 
C

Charlie O'Neill

I used your suggestion and it works just fine. But I still have one problem.

The profile pdf’s have some owners listed as “Smith.pdfâ€, another as “Jones,
Jack.pdf†and another as “Crane, Dick and Mary.pdfâ€

The last part of my string is “\†& me.lastname & “.pdf†which works
great with Smith.

How can I use a wildcard to include all names in the profile i.e.: Crane,
Dick and Mary?

I tried using the * in various ways but can’t seem to get it right.

Charlie
 
A

Arvin Meyer MVP

Multiple values do not belong in a field. If your data is poorly designed
then you'll need to fix it. I suggest searching for parsing functions to
remove all extraneous data frin what should be a lastname only field. Here's
1 that I dug up that may help:

Function ParseString(strIn As String, strPlace As String, intPiece as
Integer) As String

Dim I As Integer
Dim NextStep as Integer
Dim intStart as Integer

For I = 1 to intPiece
NextStep = InStr(NextStep,strIn,strPlace)
If NextStep = 0 then Exit For
NextStep = NextStep+Len(strPlace)
Next I

If NextStep = 0 Then
ParseString = ""
Exit Function
End If

intStart = NextStep

NextStep = InStr(intStart, strIn, strPlace)

If NextStep = 0 Then
ParseString = Mid(strIn, intStart)
Else
ParseString = Mid(strIn, intStart, (NextStep-intStart))
End If

ParseString = Trim(ParseString)

End Function
 
C

Charlie O'Neill

What I have is a folder outside of Access that was created several years ago.
The folder contains scanned profile information on our homeowners. With in
Access I am trying to create a hyperlink that will find the pdf profile sheet
for a particular homeowner. Unfortunately the names for the pdfs are varied.
My strPath in part is c:\..............\Sentry\Resident Files\†&
left(HomeID, 4) & “\†& mid(Address1, 6) & “\†& left(Address1, 4) & “\â€
& me.lastname & “.pdfâ€
Application.FollowHyperlink strPath

This will find the folder outside Access and drill down to the file name and
open the pdf. But, it only works when the file name matches the lastname
from the Access drop down box. If the last name of the homeowner is Smith
then the Smith.pdf will open. If the file has "Crane, Dick and Mary.pdf" as
its name, I would like to place a wildcard in the string so anything after
Crane is included .

Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top