Mailing a report but the subject field is too small Microsoft Access 2007

timamartin
timamartin used Ask the Experts™
on
I have some reports that get emailed to employees, but the subject field is too small. I am using a macro as shown below. What options do I have to allow me to increase the body text in the email? Create a variable and print that?
snap01018.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010

Commented:
Hello timamartin,

Why not simply add an unbound textbox to your form for people to enter/edit the subject line?  You can start
that textbox with default text, and allow edits/additions as needed...

Regards,

Patrick
timamartinIT Manager

Author

Commented:
I have created a table with miscellaneous text strings to use here and there. Is it possible to reference that table and that record in the subject line of the send mail dialogue?

I wasn't sure how to do the unbound text box deal.
Top Expert 2010

Commented:
timamartin,

You can reference a table using DLookup, or a field on your form using =Forms!FormName!TextboxName

Regards,

Patrick
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

timamartinIT Manager

Author

Commented:
So how would I put this into the Subject line in the send mail?

=IIf([Form].[Description].[TextFormat]=1,PlainText([Description]),[Description])+=DLookup[Stext], "Strings", "ID = 1"


Table = Strings
Field = Stext
Record = 1

BTW the last programming I did was using QBasic - a compilable version of BASIC!!
MIS Liason
Most Valuable Expert 2012
Commented:
timamartin,

Can you explain what the "PlainText" Function does?

In any, event try this:
=IIf([Form].[Description].[TextFormat]=1,PlainText([Description]),[Description]) & DLookup("[Stext]", "Strings", "ID =" & 1)

A few tips:
Always build you formulas one step at a time, and test each part before adding anything to it.
For example, does this return anything on it's own?:
 =DLookup[Stext], "Strings", "ID = 1"
Probably not, so why add the IIF before it?
Get this working first, then build on it.
;-)

Or looking at this another way, does this return anything on its own:
=IIf([Form].[Description].[TextFormat]=1,PlainText([Description]),[Description])
If so, is it correct?
If not, then why add the Dlookup to it?
;-)

Again, it is easier to troubleshoot one formula at a time, than a "Mega-Formula"
Make sense?
;-)

But ultimatily we have no idea what you are trying to display, so when you say:
"So how would I put this into the Subject line in the send mail?"
...We have no idea what the output should be.

Can you provide a sample of the raw data, and the exact excpected output based on the raw data please?
;-)

Thanks

JeffCoachman
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
Your Welcome
;-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial