MS Access: Creating hyperlink field in a query

  • Thread starter AndreasJ.Mueller
  • Start date
A

AndreasJ.Mueller

Hi

I have seen a several questions similar to mine in this group and on
the Internet but those did either not receive an answer or an answer
that didn't fit my problem.

I would like to build a URL in a query that I can click directly in the
query-view in Access (i.e. not in form or similar) or export the result
to Excel where the field should be clickable hyperlink as well. All I
get is a normal text.

What does work is using an insert or update "query" into a
predefined table where the URL (including the # to separate hyperlink
text from the URL) is written in a hyperlink field. Concerning Excel I
could certainly write a macro that changes the exported URLs to a
hyperlink or I could build the export in Excel using automation.

Isn't there a direct way to accomplish this?

I can't see a way to build the URL in the query to make Access
interpret it directly as a hyperlink field (I use something along the
lines of: URL:
"#http://domain.com/"+FORMAT([PROJEKTID])+".html") or more
generally speaking to enforce the type of the resulting field of a
query (similar problem with memo-fields; functions returning string are
always written in text fields with only 255 characters; longer text is
cut of).

Neither can I change the type-value of this field in the query using
VBA or build a query from scratch using VBA since the property
'type' in Querydef is read-only. I also tried joining a hyperlink
from another table and changing the URL (inserting the parameter
PROJEKTID), but again this results in a normal text.

Am I missing an easier way?

Kind regards
Andreas
 

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