กระทู้เก่าบอร์ด อ.สุภาพ ไชยา
298 1
URL.หัวข้อ /
URL
การแก้ปัญหาที่ต้องพิมพ์ mailto:kaeg@usa.net ใน Text Box ที่เป็น HyperLink
วันนี้ผมได้ตอบคำถามไว้ที่
http://bbs.elementkjournals.com/bbs/showpost.pl?Board=ima&Number=15399&page=0&view=collapsed&sb=5
โดยเขาถามคำถามนี้ไว้
I'm looking for VBA code that can be used to change the address part of a hyperlink field from the default "http://" to "mailto:".
Here's my situation...
I have a field defined in a table as Hypeylink. I want to store e-mail addresses in this field. However, Access default to the "http://" prefix whenever you type something in the field.
Thus, I'm looking for some sort of VBA code that can be used to change the address part of the hyperlink field from "http://" to "mailto:" whenever the data in the field is changed.
Thanks in advance to anyone who can assist me,
Tony
ผมเลยได้ตอบเขาไปดังนี้
I use the code below to deal with the problem.
Private Sub CEmail_AfterUpdate()
Dim strEmail As String
If Len(Me.CEmail) > 0 Then
strEmail = Left(Me.CEmail, InStr(Me.CEmail, "#") - 1)
strEmail = strEmail & "#mailto:" & strEmail & "#"
Me.CEmail = strEmail
End If
End Sub
HTH
Cheers!!
Tim K.
Thailand
http://bbs.elementkjournals.com/bbs/showpost.pl?Board=ima&Number=15399&page=0&view=collapsed&sb=5
โดยเขาถามคำถามนี้ไว้
I'm looking for VBA code that can be used to change the address part of a hyperlink field from the default "http://" to "mailto:".
Here's my situation...
I have a field defined in a table as Hypeylink. I want to store e-mail addresses in this field. However, Access default to the "http://" prefix whenever you type something in the field.
Thus, I'm looking for some sort of VBA code that can be used to change the address part of the hyperlink field from "http://" to "mailto:" whenever the data in the field is changed.
Thanks in advance to anyone who can assist me,
Tony
ผมเลยได้ตอบเขาไปดังนี้
I use the code below to deal with the problem.
Private Sub CEmail_AfterUpdate()
Dim strEmail As String
If Len(Me.CEmail) > 0 Then
strEmail = Left(Me.CEmail, InStr(Me.CEmail, "#") - 1)
strEmail = strEmail & "#mailto:" & strEmail & "#"
Me.CEmail = strEmail
End If
End Sub
HTH
Cheers!!
Tim K.
Thailand
1 Reply in this Topic. Dispaly 1 pages and you are on page number 1
1 @R06484
Time: 0.1168s