Re: Send email



"EMILYTAN via AccessMonster.com" <u33296@uwe> wrote in message
news:729960c04ae49@xxxxxx
Help!!!!
EMILYTAN wrote:
What is the difference between .Display and .Send?
I changed already but still cannot send automatically and once I open that
form on that particular record, it send the mail and i open again, it send
again...
I just want it to send automatically once i open the database without
opening
the form and send only once....
Any idea?
replace
objOutlookMsg.Display
[quoted text clipped - 7 lines]
Set objOutlook = Nothing
End Sub

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200705/1


Display will open the email in a preview window, while Send sends the email
without previewing.

Do you want the email to send automatically when you open the database or
just a specific form? If it's the database, you can set up a macro that
calls your email sub and set that macro to run automatically at startup. If
it's the form, you can put the code in the Form_Load event. In either case,
you'll need to add some code to your email routine and a flag somewhere in
your database. After the Send/Display call, you'll set that flag to True to
indicate that the email has been sent. Before the Send/Display call, you'll
check the value of that flag and only send the email if the flag is False.

Carl Rapson


.



Relevant Pages

  • Re: Date range on reports
    ... > box to your report with a control source like: ... >> In the Database window (Database window: The window that appears when you ... >> In the New Form dialog box, click Design View, and click OK. ... >> Begin by clicking Macro Names to display the Macro Name column. ...
    (microsoft.public.access.reports)
  • Re: Newbies first image: BSOD 0x7B
    ... Having all the components mentioned in the macro platform component would be ... > - add this component to the database using the Component Database Manager, ... > Info:Creating: LSI Logic FC909 Fibre Channel Adapter ...
    (microsoft.public.windowsxp.embedded)
  • RE: Macro to VBA
    ... intLogonAttempts = intLogonAttempts + 1 ... MsgBox "You do not have access to this database. ... Database Administrator ... from the macro that does the checks and opens the form if everything passes. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Combine Multiple tables into One Master table
    ... You can use a macro with 3 TransferText actions, one for each table, to get the data imported into your Access tables. ... the Open event of a form which always opens when the database opens - but then what if today's import has already been done. ... And then make an Update Query to add the data to the other fields from the related records in the other two import tables. ...
    (microsoft.public.access.macros)
  • Re: CommonDialog returns wrong context
    ... I tried setting the flag: it does not solve my problem. ... Probably because my app is calling the 'Print' CommonDialog (for which the ... connectionstrings are pointing to a database in the current path. ... connectionstring in the form load procedure does not help because of the Ado ...
    (microsoft.public.vb.bugs)