Code the Value of a Textbox into the Body of an email

  • Thread starter Thread starter Sondra
  • Start date Start date
S

Sondra

Can anyone tell me how I would code the Value of a TextBox
into the Body of your e-mail which hasn't been updated in
a form yet.

I have a form created with a Textbox_AfterUpdate Event.
However when I run the macro in the event the data that
was there prior to the update shows up. I realize the
value is not yet stored in my table. Please help.
 
Access doesn't save the new data until you move to another record, close the
form, or expressly save the data.

Where have you placed your code to send the e-mail.
Code:
DoCmd.RunCommand acCmdSaveRecord
Then do whatever other code you need.
 
I created a Macro that saves the form, opens a message
box, Sends a report to the necessary individuals and then
returns to the form to continue entering the necessary
data in the form. I executed the macro in the AfterUpdate
and still the data puts out the data prior to the update.
Please guide me in the correct direction.

Thanks.
 
Sondra,
It's not the Form you need to save, it's the Record.

There is a Run Command macro.
Set it to 'Save Record' before you do anything else.

Learn to use code. It's better for error handling and
stepping through code to find errors in logic.
 
Fred:

I am beginning to learn code; however I have to do that
away from work and I'm currently building a database at
work that I want to have features in. Could you elaborate
further on the data you supplied regarding the run command
macro and save record.

Thanks.
 
Back
Top