Setting Subject and other simple text properties

  • Thread starter Thread starter Tim Miller
  • Start date Start date
T

Tim Miller

Simple question I'm missing here:
I'm creating an appointment in Outlook from a command button in Access.
I'm trying to fill the subject and body in this code.

This works by giving the data from that Access form in the Subject:
Item.subject = [Forms]![Product Display Form]![ProductKey]

This, and many renditions of this result in a type mismatch error:
Item.subject = [Forms]![Product Display Form]![ProductKey] And " - Reserved"

That is, when I try to put text with my access fields, it doesn't work.

Can anyone tell me how to put this in?
Thanks
Tim
 
Tim,
This, and many renditions of this result in a type mismatch error:
Item.subject = [Forms]![Product Display Form]![ProductKey] And " -
Reserved"

Try this:

Item.subject = [Forms]![Product Display Form]![ProductKey] & " - Reserved"

hth,
--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Tim Miller said:
Simple question I'm missing here:
I'm creating an appointment in Outlook from a command button in Access.
I'm trying to fill the subject and body in this code.

This works by giving the data from that Access form in the Subject:
Item.subject = [Forms]![Product Display Form]![ProductKey]

This, and many renditions of this result in a type mismatch error:
Item.subject = [Forms]![Product Display Form]![ProductKey] And " - Reserved"

That is, when I try to put text with my access fields, it doesn't work.

Can anyone tell me how to put this in?
Thanks
Tim
 
Thank was the ticket... thanks! I knew it was something silly simple.

Cheryl Fischer said:
Tim,
This, and many renditions of this result in a type mismatch error:
Item.subject = [Forms]![Product Display Form]![ProductKey] And " -
Reserved"

Try this:

Item.subject = [Forms]![Product Display Form]![ProductKey] & " - Reserved"

hth,
--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Tim Miller said:
Simple question I'm missing here:
I'm creating an appointment in Outlook from a command button in Access.
I'm trying to fill the subject and body in this code.

This works by giving the data from that Access form in the Subject:
Item.subject = [Forms]![Product Display Form]![ProductKey]

This, and many renditions of this result in a type mismatch error:
Item.subject = [Forms]![Product Display Form]![ProductKey] And " - Reserved"

That is, when I try to put text with my access fields, it doesn't work.

Can anyone tell me how to put this in?
Thanks
Tim
 

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

Back
Top