|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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?
|
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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:"
|
|
#4
|
|||
|
|||
|
Try this instead in the AfterUpdate:
ControlName = ControlName.Text & "#" & "MailTo:" & ControlName.Text Inserting the "#" should specify to open the email client lwells |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Auto add 'mailto:' in hyperlink field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|