Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RE: hyperlink fails

2 views
Skip to first unread message

MarkInSalemOR

unread,
Apr 19, 2010, 3:08:01 PM4/19/10
to
Just an update I created a new table in the same database and that table's
hyperlinks work fine when the hyperlink is pasted into the field. Sure looks
to me like this is an issue with how the SQL Insert works or the command I'm
using to execute it.

I'll setup an ADO connection object and see if it's execute method works
better.

Mark

"MarkInSalemOR" wrote:

> My version of Access is 2007 SP2 MSO
>
> I have an Access database with paths to a mapped drive on my system. The
> data field is set to the hyperlink type. The hyperlinks fail to work. I've
> also created a form based on the table and the hyperlinks fail.
>
> I have created another Access database and fields work as expected clicking
> the link works fine. In this database and table I've entered the paths
> manually, clicking on the field and entering them with my keyboard.
>
> In the database that fails the data is being loaded with an insert statement.
> This is in a procedure that is passed file name data in the format
> F123456|F1234567. The file names don't contain extensions but are known to
> all be .tif format. strFullPath contains the path of the folder the .tif
> files are stored in. Other values are ID numbers being stored in this table.
>
> strArrayImageID = Split(a_strImageID, "|")
> lngImageCount = UBound(strArrayImageID) + 1
>
> 'setup fullpath
>
>
> Do 'until X = lngImageCount
> strFullPath = a_strFolderPath & "\" & strArrayImageID(X) & "." &
> a_strFileExtension
> strInsertSQL = "INSERT INTO T_IMAGE_XREF ( NBR_AUDIT_RECORD_FK,
> NBR_ICN, NBR_IMAGE, LINK_IMAGE, " _
> & "TXT_FOLDER_PATH, TXT_IMAGE_PATH) " _
> & "VALUES (" & a_lngAuditRecordNumber & ",'" & a_strICN &
> "','" & strArrayImageID(X) & "','" & strFullPath & "','" _
> & a_strFolderPath & "','" & strFullPath & "');"
> DoCmd.RunSQL strInsertSQL
> X = X + 1
> Loop Until X = lngImageCount
>
> So is my problem simply a corrupt database table or is using this method of
> data entry the problem? Either the insert statement or the DoCmd.RunSQL
> command.
>
> The image container control will not store the .tif format files and the
> source of the data refuses to convert them into a format it will store. So I
> can't go that route. It's very unlikely my employer will authorize the
> purchase of a non-Microsoft image control to either convert the image file or
> to store it.
>
> The shell command returns an invalid procedure call or argument in any
> database I setup. I'm stuck with using Access 2000 format database files
> since my users can have Access 2000 to Access 2007 on their systems.
>
> Thanks
> Mark

MarkInSalemOR

unread,
Apr 19, 2010, 2:50:02 PM4/19/10
to

MarkInSalemOR

unread,
Apr 19, 2010, 5:22:01 PM4/19/10
to
After playing this for a while I opened the edit hyperlink option that
appears when right clicking on the data. The pasted in hyperlink has an
address the programmatically entered one does not. The hyperlink.address is
read only in VBA so as near as I can tell this can't be done. It appears it
won't allow me to set the field value to a hyperlink object, so I can't set
the address in a hyperlink object and set it that way.

I've tried ADO and DAO methods and the Access Docmd I've even tried to enter
the value into the form and move the cursor off the field. That doesn't work
either.

Looks like I've got to set 2,282 records addresses manually using the right
click and edit hyperlink menu.

Mark

Jeanette Cunningham

unread,
Apr 19, 2010, 9:01:50 PM4/19/10
to
I don't use hyperlinks much at all, but there is some practical help with
using hyperlinks here

http://allenbrowne.com/func-GoHyperlink.html


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"MarkInSalemOR" <MarkIn...@discussions.microsoft.com> wrote in message
news:8F31C08C-536D-4F2B...@microsoft.com...

MarkInSalemOR

unread,
Apr 20, 2010, 12:01:01 PM4/20/10
to
Thanks Jeanette that works perfect. Instead of saving the data as a hyperlink
I simply run the full path through the GoHyperlink function.

I also found the Access 2007 attachments feature useful too. Although not
all of my users will be able to move to Access 2007 so getting the file paths
to open really helps.

Mark

"Jeanette Cunningham" wrote:

> .
>

0 new messages