A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how can i get access to open up Outlook by clicking on an email ad



 
 
Thread Tools Display Modes
  #1  
Old December 18th, 2008, 01:36 PM posted to microsoft.public.access
Shazza
external usenet poster
 
Posts: 104
Default how can i get access to open up Outlook by clicking on an email ad

I am currently setting up a database and have a query on it. So far I've
done my tables and relationships and have created forms. I want the form to
be user friendly so when anyone needs to add information to it then it can be
done simply. This particular form includes contact information of
businesses. There are fields for an e-mail address and web address which I
have made hyperlink columns so when I enter data into these fields and click
on it, it tries to connect to a website. This is fine for the field
"Website" but for the e-mail address I would like it to open outlook when
clicked. I have managed to edit the hyperlink manually for every address I
have already entered which means that they are now all linked to e-mail
addresses rather than web addresses. This was time consuming and users of the
database who just want to enter information may not know how to do this. I
was wondering is it possible to edit the whole e-mail column so that when an
e-mail address in entered into it, it is automatically linked to an e-mail
address?

--
Thank you for reading my post. Hopefully you can answer my querie
  #2  
Old December 18th, 2008, 02:16 PM posted to microsoft.public.access
BruceM[_2_]
external usenet poster
 
Posts: 1,763
Default how can i get access to open up Outlook by clicking on an email ad

If I understand correctly you want to send an e-mail by clicking on the text
box containing the e-mail address. You could have something like this as
the text box Click event:

Private Sub txtEmail_Click()

On Error GoTo ProcErr

DoCmd.SendObject , , , Nz(Me.Email,"")

ProcExit:
Exit Sub

ProcErr:
If Err.Number 2501 Then ' 2501: Sending e-mail was canceled
MsgBox "Error " & Err.Number & " (" & Err.Description & ") " & _
"in txtEmail_DblClick, Form_frmAddress"
End If
Resume ProcExit

End Sub

This code opens an e-mail message to the address in the Email field. The
code assumes Email is the name of the field containing the e-mail address,
and txtEmail is the name of the text box bound to that field. Use whatever
names you choose. See Help for more about SendObject. The Nz function in
the address argument avoids an error if the field is null. In that case the
e-mail message is not addressed to anybody. I added error handling to
ignore Error 2501, which appears if the user closes the e-mail instead of
sending it.

You may want to consider using the double click event, or a command button
click event, instead of the txtEmail click event. With the click event as
written the user can't click into the text box to enter the information in
the first place (although they can Tab into it). You could prevent that by
replacing this code:
DoCmd.SendObject , , , Nz(Me.Email,"")
with this:
If Not IsNull(Me.Email) Then
DoCmd.SendObject, , , Me.Email
End If

Another consideration against using the Click event is that editing will be
more difficult.


"Shazza" wrote in message
...
I am currently setting up a database and have a query on it. So far I've
done my tables and relationships and have created forms. I want the form
to
be user friendly so when anyone needs to add information to it then it can
be
done simply. This particular form includes contact information of
businesses. There are fields for an e-mail address and web address which
I
have made hyperlink columns so when I enter data into these fields and
click
on it, it tries to connect to a website. This is fine for the field
"Website" but for the e-mail address I would like it to open outlook when
clicked. I have managed to edit the hyperlink manually for every address
I
have already entered which means that they are now all linked to e-mail
addresses rather than web addresses. This was time consuming and users of
the
database who just want to enter information may not know how to do this.
I
was wondering is it possible to edit the whole e-mail column so that when
an
e-mail address in entered into it, it is automatically linked to an e-mail
address?

--
Thank you for reading my post. Hopefully you can answer my querie


  #3  
Old December 18th, 2008, 03:19 PM posted to microsoft.public.access
Shazza
external usenet poster
 
Posts: 104
Default how can i get access to open up Outlook by clicking on an emai

Thanks for that i will give it a go :-)
--
Thank you for reading my post. Hopefully you can answer my querie


"BruceM" wrote:

If I understand correctly you want to send an e-mail by clicking on the text
box containing the e-mail address. You could have something like this as
the text box Click event:

Private Sub txtEmail_Click()

On Error GoTo ProcErr

DoCmd.SendObject , , , Nz(Me.Email,"")

ProcExit:
Exit Sub

ProcErr:
If Err.Number 2501 Then ' 2501: Sending e-mail was canceled
MsgBox "Error " & Err.Number & " (" & Err.Description & ") " & _
"in txtEmail_DblClick, Form_frmAddress"
End If
Resume ProcExit

End Sub

This code opens an e-mail message to the address in the Email field. The
code assumes Email is the name of the field containing the e-mail address,
and txtEmail is the name of the text box bound to that field. Use whatever
names you choose. See Help for more about SendObject. The Nz function in
the address argument avoids an error if the field is null. In that case the
e-mail message is not addressed to anybody. I added error handling to
ignore Error 2501, which appears if the user closes the e-mail instead of
sending it.

You may want to consider using the double click event, or a command button
click event, instead of the txtEmail click event. With the click event as
written the user can't click into the text box to enter the information in
the first place (although they can Tab into it). You could prevent that by
replacing this code:
DoCmd.SendObject , , , Nz(Me.Email,"")
with this:
If Not IsNull(Me.Email) Then
DoCmd.SendObject, , , Me.Email
End If

Another consideration against using the Click event is that editing will be
more difficult.


"Shazza" wrote in message
...
I am currently setting up a database and have a query on it. So far I've
done my tables and relationships and have created forms. I want the form
to
be user friendly so when anyone needs to add information to it then it can
be
done simply. This particular form includes contact information of
businesses. There are fields for an e-mail address and web address which
I
have made hyperlink columns so when I enter data into these fields and
click
on it, it tries to connect to a website. This is fine for the field
"Website" but for the e-mail address I would like it to open outlook when
clicked. I have managed to edit the hyperlink manually for every address
I
have already entered which means that they are now all linked to e-mail
addresses rather than web addresses. This was time consuming and users of
the
database who just want to enter information may not know how to do this.
I
was wondering is it possible to edit the whole e-mail column so that when
an
e-mail address in entered into it, it is automatically linked to an e-mail
address?

--
Thank you for reading my post. Hopefully you can answer my querie



  #4  
Old December 18th, 2008, 03:22 PM posted to microsoft.public.access
Ron2006
external usenet poster
 
Posts: 936
Default how can i get access to open up Outlook by clicking on an emailad

If you simply make both of those fields txt fields and txt boxes, it
makes entry extremely easy.

Then....

On the Web addres field add code to the dbl-click event to
application.followhyperlink me.txtfieldname

On the email address add code to the dbl-click event to:

Application.FollowHyperlink "mailto:" & Me.fieldname

Ron
  #5  
Old December 19th, 2008, 01:16 AM posted to microsoft.public.access
jenniferd
external usenet poster
 
Posts: 3
Default how can i get access to open up Outlook by clicking on an emai

Hi Ron!

I have a media document that was sent to me with e-mail addressess and I
can't figure out how to be able to click on the e-mail address in the excel
document and lhave it link out as and e-mail. I read your post and I was
wondering if you could help me as well? I don't know how to add code on
excel. Any ideas for me? Please? Thanks!! Jennifer

"Ron2006" wrote:

If you simply make both of those fields txt fields and txt boxes, it
makes entry extremely easy.

Then....

On the Web addres field add code to the dbl-click event to
application.followhyperlink me.txtfieldname

On the email address add code to the dbl-click event to:

Application.FollowHyperlink "mailto:" & Me.fieldname

Ron

  #6  
Old December 19th, 2008, 01:20 PM posted to microsoft.public.access
Ron2006
external usenet poster
 
Posts: 936
Default how can i get access to open up Outlook by clicking on an emai

Jenniferd,

hmmm. My version of Xcel does that automatically. I opened a new
spreadsheet, typed in an email address. As soon as I got off of it the
address automatically set itself to be underlined and blue in color.
When I put my mouse over it it showed the "Mail to: " format and when
I clicked it it opened an email addressed to that address. My guess is
that it may be some security settings or possibly a version related
issue of Xcel.

I tried but was unable to find anything specific or that changed that
action/process. I know there is an Xcel group here in google Groups
that covers Xcel. You may have to go there and ask that specific
question. I think it is a question of some type of setting in your
version.

Good Luck.

Ron
 




Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.