hyperlink query

kitty77

Registered User.
Local time
Today, 09:53
Joined
May 27, 2019
Messages
715
I'm using the following code in a query. How can I make it a hyperlink in the query results?

Expr1: "z:\abc\results" & [Field1]
 
add hash # to your expression:

Expr1: "#z:\abc\results" & [Field1] & "#z:\abc\results" & [Field1] & "#"
 
Is it twice? I'm confused...
 
Not getting a hyperlink in the results of the query.

Getting this: #z:\abc\results\7537.pdf#
 
the first part of the hyperlink is the text you see on display.
the second part is the actual link.
to revise:

Expr1: "#" & [Field1] & "#z:\abc\results" & [Field1] & "#"

so whatever [Field1] content will be shown to the screen, the rest of the Expression is hidden on view.

EDIT:

Expr1: [Field1] & "#z:\abc\results\" & [Field1] & "#"
 
Last edited:
I see...

But still no hyperlink.

I'm getting: #7537.SPA#z:\abc\results7537#
 
you need to put the query in a form (datasheet, etc).
on the property sheet->format->is hyperlink (yes).

check also post #5 EDIT portion.
 
So, I can't do it in just a query? The output? I'm trying to simply export the query to excel with hyperlinks.
 
even on a table with Hyperlink field, when exported to excel will come out as not a hyperlink.
 
I see... Any idea how to export the data with a clickable hyperlink?
 
I don't think you can export data from a query to Excel and have it displayed as a hyperlink.

I have done it by automation

Code:
wsSheet.hyperlinks.add anchor:=application.selection, address:=   "mailto:someone@somewhere.com", TextToDisplay:="This what is displayed"

This will create a hyperlink in the active cell of excel, in this case to an email address. Open a recordset based on your query and loop through it to export multiple hyperlink.

Search for something like
"ms access vba excel automation" to get some ideas and come back here if you need more help
 

Users who are viewing this thread

Back
Top Bottom