John-
The reason I want to remove this "#" is because that I changed the hyperlink to text type. I found that the hyperlink took long time to load. Thanks a lot.
Best Regards,
Kevin
Date: 2015-12-14 17:57Subject: Re: [MS_AccessPros] Replace functionKevin-
MyString is just a variable you declared, and it will be empty when you call this code.Why do you want to replace the # in the Website field? If it is defined as a Hyperlink data type, then it can contain up to four parts delimited with "#".Display Text#Hyperlink address#Sub address#Tool tipSo, a Hyperlink might look like:Recommended Reading#http://www.viescas.com/category/goodreads/##Click to see book recommendationsThe second part is at the actual hyperlink, and if there was a bookmark on the page that the link needed to go to, it would be in the third part. When you look at this displayed in a Text Box, you will see "Recommended Reading" displayed. If you hover over the control, a tip will pop up displaying "Click to see book recommendations".If you really want to replace the # characters, your code should be:Me.Website = Replace(Me.Website, "#", " ")John Viescas, AuthorMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access ApplicationsSQL Queries for Mere Mortals(Paris, France)
On Dec 14, 2015, at 9:43 AM, 'zhaoliqingoffice@163.com' zhaoliqingoffice@163.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:Dear All,I want to remove the "#" from the webaddress, I use Replace function. the code is like this:Private Sub Command45_Click()
Dim MyString As String
MyString = Replace(Me.Website, "#", " ")
End SubAfter clicking the command button, nothing happened. What's wrong with the code? Thanks!Best Regards,Kevin
__._,_.___
Posted by: "zhaoliqingoffice@163.com" <zhaoliqingoffice@163.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar