Re: How to copy/paste text from a form to email
- From: "Alex Dybenko" <alexdyb@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 17 May 2008 09:31:29 +0400
Hi,
if primary key of tblmaster is ID then it will be:
SQL = "Update tblmaster set [notes]=[notes] & ',' & Now() where ID=" & forms!Telephone!ID
docmd.runsql SQL
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
"TomP" <TomP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:391B9149-00D7-4CAC-B6FD-8D22CF125CDE@xxxxxxxxxxxxxxxx
Thank you for your help! I got the first part done. I'm having problems
with the SQL part. Here is what I wrote. The name of my table is called
Master and the name of my form is called Telephone. After the email is sent,
I want to update the notes field on the form. Here is what I tried. I'm not
clear what goes in the question marks. I just want the notes field in the
form to include that an email was sent.
Thank you!
Dim SQL As String
SQL = Update tblmaster set [notes]=[notes] & ',' & Now() where ???
"Alex Dybenko" wrote:
> 1. I want to copy/paste a value in my current form on the subject > liine
> of
> my email. The name of the textbox in my form is called Number. Am I
> supposed to include that information after the line entry ..... "Ref: > ", _
> ... which alread shows up in my email?
so in your sendobject metod instead if "Ref:" write "Ref:" &
forms!MyForm!Number
MyForm - should be a name of your form, if you run this from class behind
form - you can use Me!Number
> 2. In my current form, I have a textbox called Notes. How do I add a
> one-line entry to include date/time email was sent?
run a query with following SQL:
Update mytable set [Notes]=[Notes] & ', ' & Now() Where Number=
forms!MyForm!Number
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
> "Alex Dybenko" wrote:
>
>> 1. just add a reference to your textbox:
>> "Ref: " & forms!MyForm!textfromform
>>
>> 2. You can run update query to set date/time in appropriate table >> after
>> docmd.sendobject
>>
>> -- >> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://accessblog.net
>> http://www.PointLtd.com
>>
>>
>>
>> "TomP" <TomP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:C352A280-620A-4B09-A7B4-9541B9D9033C@xxxxxxxxxxxxxxxx
>> > Yes, here is what I have so far (see below). I would like to do two
>> > things.
>> >
>> > First: I would like to copy text data from the textbox field in my
>> > form
>> > to
>> > "Ref: textfromform".
>> >
>> > Second: I would like to have MS Access automatically pass >> > additional
>> > information on my form annotating that an email was sent to a >> > recipient
>> > with
>> > date and time email sent.
>> >
>> > DoCmd.SendObject _
>> > , _
>> > , _
>> > , _
>> > " ", _
>> > , _
>> > , _
>> > "Ref: ", _
>> > " ", _
>> > True
>> >
>> > "Alex Dybenko" wrote:
>> >
>> >> Hi,
>> >> have you tried docmd.SendObject ?
>> >>
>> >> -- >> >> Best regards,
>> >> ___________
>> >> Alex Dybenko (MVP)
>> >> http://accessblog.net
>> >> http://www.PointLtd.com
>> >>
>> >>
>> >> "TomP" <TomP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >> news:9E909731-6383-4B49-AFE3-1D4F7EB04F03@xxxxxxxxxxxxxxxx
>> >> >I created a telephone log in MS Access and would like to know if
>> >> >there
>> >> >is a
>> >> > way I can copy my notes from a form in Access and past it to my
>> >> > message
>> >> > automatically? Also, is there a way to have an entry added in my
>> >> > notes
>> >> > to
>> >> > indicate that an email was sent?
>> >> >
>> >> > Thank you for your help,
>> >>
>> >>
>>
>>
.
- Follow-Ups:
- References:
- How to copy/paste text from a form to email
- From: TomP
- Re: How to copy/paste text from a form to email
- From: Alex Dybenko
- Re: How to copy/paste text from a form to email
- From: TomP
- Re: How to copy/paste text from a form to email
- From: Alex Dybenko
- Re: How to copy/paste text from a form to email
- From: TomP
- Re: How to copy/paste text from a form to email
- From: Alex Dybenko
- Re: How to copy/paste text from a form to email
- From: TomP
- How to copy/paste text from a form to email
- Prev by Date: Re: Link Error
- Next by Date: Re: Remove Tool Bar Reference
- Previous by thread: Re: How to copy/paste text from a form to email
- Next by thread: Re: How to copy/paste text from a form to email
- Index(es):
Relevant Pages
|