From: Charno on 21 Apr 2010 02:45 I've added an email button to a form 'chill intake'. The button is looking at a field on the form 'Haulier' and finding the email address for that haulier in a table called 'Hauliers', it will then open a new blank email with the Hauliers email address in the 'TO:' box. The form macro i have for this is : =(DLookUp("[Email Address]","Hauliers","ID=" & ([Haulier],0))) However when i click on the button an error occours and access shuts down. This has only happened after adding the above. Any ideas?
From: Daryl S on 21 Apr 2010 09:09 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?
|
Pages: 1 Prev: Microsoft Office Spreadsheet 10.0 Next: How to create Access 2010 Calculated field using VBA ? |