Hyperlinks and Forms (1 Viewer)

chrisjrice

Registered User.
Local time
Today, 06:15
Joined
Mar 26, 2002
Messages
37
Hello,

I want to be able to hyperlink to a MS Word doucment, but I want the path to be built up in access. I have a database field called SDRNO, the value of this will be the document name.

Using access VB can how do I build this up???

Any help would be much appreciated.

Thanks

Chris
 

chrisjrice

Registered User.
Local time
Today, 06:15
Joined
Mar 26, 2002
Messages
37
Thanks for asking, I have now resolved this issue I am using the me.command.hyperlinkaddress = "address" which works. The only problem I am having now is where the database field I am using is 8 characters long but the content of the field is actually 6 characters I am getting trailing blanks. I have tried to use the TRIM command but Access VB won't take it.

example of my code:

me.command.hyperlinkaddress = "Projects/" + DatabaseField + ".Doc".

Database field = 8 Characters, content of field = "SDR001 "

Result = "Projects/SDR001 .DOC

I tried using MyString = Trim(Databasefield). then using mysting, but for some reason it keeps erroring on trim saying it cannot find the libl.

any ideas?
 

dcx693

Registered User.
Local time
Today, 01:15
Joined
Apr 30, 2003
Messages
3,265
Hmm... don't know what the deal is with that Trim function not working. I also don't know why you're getting trailing spaces in your field. That 8 should be the maximum size of the field. It's a text field, right? I guess you can work around the problem using the Left(Databasefield,6) formula.
 

chrisjrice

Registered User.
Local time
Today, 06:15
Joined
Mar 26, 2002
Messages
37
Solved that problem. I am working with linked tables. These are linked to my DB2 database. I was trying to trim the database field.

I had to move the value into another string then trim that. Which worked.

So now I have the correct path, but.... I keep getting a message now that says "cannot open the specified file" the path and naming etc is perfect.

A problem to be looked into tommorow perhaps!!

Thanks for your help, if you can be any help with the above then superb!

Thanks

Chris
 

Users who are viewing this thread

Top Bottom