Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting query on field type Hyperlink

Status
Not open for further replies.

Crookshanks

Technical User
May 18, 2004
296
0
0
NL
Hello there,

I've got a small question and maybe you could help me. I am using a listbox to show the result of a query. By pressing some labels you can sort the query on the field you like.

Problem: When I try to sort the field with links (field type = Hyperlink) the query does not sort the records in the expected way. Is this a know problem? I.e. does Microsoft Access sort Hyperlinks in another way. The weird thing is that all the other fiels are sorting fine (same code). All help appreciated.

Regards,
 
Have a look at the HyperlinkPart function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV!

That is definitely the cause of the problem. All I have to do is solve it. I've read the documentation about the HyperlinkPart Method but I just want to display the text which is stored in the database as there are links to documents on the network as links to the Internet.

None of the supplied values seem to fullfill my needs.
Any suggestions?
 
How about using just the first part in your query?

[tt]SELECT Mid([HL],1,InStr([HL],"#")-1) FROM tblTable[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top