ASP Hyperlink - querystring problem

  • Thread starter Thread starter Ian King
  • Start date Start date
I

Ian King

I have a button on an Access form that sends a Client's details to a
registration page on the internet using the 'Application.FollowHyperlink'
method. It works fine, except the character '&' within a field (eg Fred
Smiff & Sons) screws up the corresponding text field, and the next one, in
the asp page. I can understand why this happens, but does anyone know if
there is a function to encode the querystring in Access to overcome this.

If not, and I have to create my own function, are there any other characters
that I should be aware of that will cause problems?

I would sincerely appreciate any help in this matter

Ian King
 
Ian King said:
I have a button on an Access form that sends a Client's details to a
registration page on the internet using the
'Application.FollowHyperlink' method. It works fine, except the
character '&' within a field (eg Fred Smiff & Sons) screws up the
corresponding text field, and the next one, in the asp page. I can
understand why this happens, but does anyone know if there is a
function to encode the querystring in Access to overcome this.

If not, and I have to create my own function, are there any other
characters that I should be aware of that will cause problems?

I'm not sure, but I think you'll probably want to replace the "&" with
"&". You can use the Replace function to do this; e.g.,

Dim strURL As String

strURL = "Fred Smiff & Sons"

strURL = Replace(strURL, "&", "&")

I suspect you'll also have to look out for and replace characters as
follows:

< &lt;
" &quot;

There maybe others.
 
Back
Top