Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 25th, 2005, 10:55 AM
Shell Shell is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: UK
Posts: 2 Shell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 55 sec
Reputation Power: 0
Auto add 'mailto:' in hyperlink field

I have a hyperlink field on a form in which to store email addresses. If when the address is entered it is preceded by "Mailto:" then clicking on the link will open up the email package as required, however I would like to set it so that users can just type just the email address directly into the form field without having to remember to type in the "mailto bit". Any ideas if this is possible?

Reply With Quote
  #2  
Old August 25th, 2005, 11:42 AM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
In the AfterUpdate of your control, would something like this work for you?

If Not Left(ControlName.Text, 8) = "Mail To:" Then
ControlName = "Mail To:" & ControlName
End If

Using the name of the control in your form above for ControlName. Wasn't sure if there is suppose to be a space between "Mail To:" or not so correct it if necessary.

Just a suggestion.
lwells

Reply With Quote
  #3  
Old August 26th, 2005, 03:22 AM
Shell Shell is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: UK
Posts: 2 Shell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 55 sec
Reputation Power: 0
Further problem - http:// auto added

Sorry, I have just noticed that Access automatically adds Http:// to the frount of data entered into the hyperlink field, therefore I need code that removes this and replaces it with "mailto:"

Reply With Quote
  #4  
Old August 26th, 2005, 08:54 AM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Try this instead in the AfterUpdate:

ControlName = ControlName.Text & "#" & "MailTo:" & ControlName.Text

Inserting the "#" should specify to open the email client

lwells

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Auto add 'mailto:' in hyperlink field


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT