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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to pdf files

Status
Not open for further replies.

bfamo

Technical User
Feb 16, 2006
132
NO
Hi,

We have a database at work with a register of all the chemicals we use on a daily basis. Each of these chemicals comes with a pdf document specification. All of these documents are stored in the folder C:\chemicals\pdf\.

What I'm working on is a way to connect each record in the database to the corresponding pdf document in the folder.

The name of the pdf files have the following format: Autonumber#Chemicalname.pdf.

Autonumber is the unique number assigned each record in the database.

The code I have so far goes like this:
Code:
Private Sub pdfico_Click()
FollowHyperlink "C:\Chemicals\pdf\" & Me.ChemID & ".pdf"
End Sub

So, how do I get this code to return the value in front of the separator #?
 
so the database doesnt know any of the pdf filenames already it only knows the path and the autonumber of each pdf? correct? or does it know the chemicalname as well?

if it knows both, are they stored in seperate fields?

is the autonumber a fixed length?



It's not what you know. It's who's on Tek-Tip's
 
is Me.ChemID the Chemicalname part of Autonumber#Chemicalname.pdf?



It's not what you know. It's who's on Tek-Tip's
 
Hi,

The database does not know the filenames, only the autonumber that is manually inserted before the chemical name in the file. The autonumber is separated from the chemical name with a #.Is it possible to make a code that disgards the filename, and only looks for that autonumber in the filename?

Me.ChemID is the Autonumber part of Autonumber#Chemicalname.pdf. I'm still working on how to handle Chemicalname :)
 
is the autonumber a fixed length? i.e. 00001, 00002, 00010 or is it something like 1, 2, 10, etc...

It's not what you know. It's who's on Tek-Tip's
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top