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  

Email Button



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2010, 07:52 AM posted to microsoft.public.access
Charno
external usenet poster
 
Posts: 20
Default Email Button

I have added an email button to a form 'Chill intake', which looks at the
field 'Haulier' and then looks up the email address for the haulier in a
table called 'Hauliers'. On click the button should open a blank email with
the hauliers email address in the 'TO:' field.

The form macro i'm using is =(DLookUp("[Email Address]","Hauliers","ID=" &
([Haulier],0)))

However when i click on the button it causes an issue that closes Access down.
Any Ideas?
  #2  
Old April 21st, 2010, 02:09 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Email Button

Charno -

I think the ,0 after [Haulier] is a problem. I removed it. Try this (if
Haulier is a numeric):

=(DLookUp("[Email Address]","Hauliers","ID=" &
[Haulier]))

Or this (if Haulier is text):
=(DLookUp("[Email Address]","Hauliers","ID='" &
[Haulier] & "'"))

--
Daryl S


"Charno" wrote:

I have added an email button to a form 'Chill intake', which looks at the
field 'Haulier' and then looks up the email address for the haulier in a
table called 'Hauliers'. On click the button should open a blank email with
the hauliers email address in the 'TO:' field.

The form macro i'm using is =(DLookUp("[Email Address]","Hauliers","ID=" &
([Haulier],0)))

However when i click on the button it causes an issue that closes Access down.
Any Ideas?

 




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 06:59 PM.


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