Macro SendObject Text

  • Thread starter ladybug via AccessMonster.com
  • Start date
L

ladybug via AccessMonster.com

I have a macro called mcr_email_pre-review
This macro has one action which is SendObject.
In the SendObject Message Text I had this:
=[Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]![it_est_total] &
[Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]![op_est_total]

Which worked great. However, it returned both together with no spaces.

I wanted to add labels and spaces so I tried this:
="IT EST - " & [Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]!
[it_est_total] & “OP EST -†& [Forms]![sfrm_status_of_lif_notes]!
[frm_rom_hours_notes]![op_est_total]

I now get an error that states Database can't parse the exression:="IT EST -
" & [Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]![it_est_total] &
“OP EST -†& [Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]!
[op_est_total]


Can anyone help me modify my code so that I can provide labels? Thank you.
 
S

Steve Schapel

Ladybug,

I am not sure whether this is the entire problem, but I notice your
expression includes fancy modified quote marks around “OP EST -”, which
indicates you may have copy/pasted it out of a word processing document.
Change this “” to plain text quote marks "" in the macro property setting.
 
L

ladybug via AccessMonster.com

That is exactly the problem! Thank you!

Do you happen to know how to break them up so each field is on a separate
line?

Thank you for your help!



Steve said:
Ladybug,

I am not sure whether this is the entire problem, but I notice your
expression includes fancy modified quote marks around “OP EST -â€, which
indicates you may have copy/pasted it out of a word processing document.
Change this Ҡto plain text quote marks "" in the macro property setting.
I have a macro called mcr_email_pre-review
This macro has one action which is SendObject.
[quoted text clipped - 15 lines]
Can anyone help me modify my code so that I can provide labels? Thank you.
 
S

Steve Schapel

Ladybug,

You mean like this:

="IT EST - " &
[Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]![it_est_total]
& Chr(13) & Chr(10) & "OP EST -" &
[Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]![op_est_total]
 
L

ladybug via AccessMonster.com

That is perfect!
I added a couple more fields and it will not let me type enough characters.
Do you know a way around that?

Thank you again for all your help.


Steve said:
Ladybug,

You mean like this:

="IT EST - " &
[Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]![it_est_total]
& Chr(13) & Chr(10) & "OP EST -" &
[Forms]![sfrm_status_of_lif_notes]![frm_rom_hours_notes]![op_est_total]
That is exactly the problem! Thank you!

Do you happen to know how to break them up so each field is on a separate
line?

Thank you for your help!
 
S

Steve Schapel

Ladybug,

Use simpler names for your forms and fields! ;-)

Also, it depends where the macro is being called from. For example, if
the SendObject was being triggered from a command button on the
[frm_rom_hours_notes] subform, you wouldn't need all the directions.
This will do:

="IT EST - " & [it_est_total] & Chr(13) & Chr(10) & "OP EST -" &
[op_est_total]
 
R

REG

Is there some way to create macros to insert into email on Windows Mail on
Vista? Easy in Word but can't seem to get them to work in messages, forms,
etc.
Much thanks.
REG
 
D

Douglas J. Steele

Sorry, this newsgroup is for questions about Access, the database product
that's part of Office Professional. Macros in Access are very different that
macros in any other Office Product.

You migt get a better answer if you repost to a newsgroup related to Windows
Mail (like microsoft.public.windows.vista.mail). However, Windows Mail is a
replacement for Outlook Express, and Outlook Express didn't support macros,
so it wouldn't surprise me if Windows Mail didn't either.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top