Agreed, Ray. The inconsistencies are not helpful, and the lack of any
obvious way to specify absolute/relative in the dialog really limits its
usefulness. There's also a security warning issue in A2003 as well, and you
can't avoid that just by lowering the setting under Tools | Macros |
Security.
You can specify a HyperlinkBase through File | Database Properties | Summary
if that's any help. I guess you could use the AfterUpdate event of the text
box to parse the hyperlink with HyperlinkPart() and fix up the path if
necessary.
Realistically, though, I've given up on using hyperlinks to store links to
local files. Instead I just use a Text or Memo field, with a command button
to insert the file or path using the API code in:
http://www.mvps.org/access/api/api0001.htm http://www.mvps.org/access/api/api0002.htm
This avoids the display problems (user modifes the display and not the
address), path issues, security interruptions, and inconsistencies.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Ray" <No**************@Yahoo.com.HK> wrote in message
news:32*************@individual.net...
Allen,
Thanks for your useful information.
Now, my database has some data entered by Access 97 in the past and by
Access 2003 now. I note that they store the data differently as below:-
Access 97 - #Disk P002\FrmSmp97.mdb#
Access 2003 - Disk P002\FrmSmp97.mdb#Disk%20P002/FrmSmp97.mdb#
Both display texts are "Disk P002\FrmSmp97.mdb". When I move the cursor
to both fields, they show differences as below:-
Access 97 - Disk P002\FrmSmp97.mdb
Access 2003 - Disk%20P002\FrmSmp97.mdb
I can tolerate the difference provided there is no functionality issue.
However, it seems to store the relative path. In Access 97, there is an
option to select relative path or absolute path. Do you have any idea
where it is on Access 2003.
In addition, the path shows on the bottom bar when the cursor is on the
hyperlink field but now only shows "Form View".
Thanks,
Ray
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41***********************@per-qv1-newsreader-01.iinet.net.au... Hyperlinks have to work with files from different operating systems, e.g.
Unix on the web. Some systems do not cope with embedded spaces, so the
standard is to replace a questionable character with a percent sign
followed by the hexadecimal value for the character. 20h is a space.
This is the correct way to specify file names in the Address part of the
hyperlink field. You will also notice forward slashes in the path. If you
don't like how it looks, you can set the Display part of the hyperlink
however you wish.
The HyperlinkPart() function is useful for parsing the parts of the
hyperlink. More info on how hyperlinks work in:
Introduction to Hyperlink fields
at:
http://members.iinet.net.au/~allenbrowne/casu-09.html
"Ray" <No**************@Yahoo.com.HK> wrote in message
news:32*************@individual.net...I recently upgraded from Access 97 to Access 2003 and just enter some new
data into table via an input form. The form has one hyperlink field to
contain a file path. In Access 2003, it appears not to accept file path
and
adds some additional characters, i.e.,%20 between space of the file
path.
Can someone advise why it happens and if I can use the old method to
store
the file path.