Last Question for the day...it's a toughy

NavyJoe

Board Regular
Joined
Sep 14, 2004
Messages
63
I have a field called Subject. This field is a large text field. Every record will contain the same information except some data entered into other fields on that record.

This is what I want:

Subject:

Recommendation for Award of the [AWARD_LONG] ([AWARD]) to [RANK SHORT] [FIRST NAME] [MI] [LAST NAME],[BRANCH], for the Period of [DATE FROM] to [DATE TO].

The bold words are Fields.

I thought of using the same code like the email code and putting all the common words in " " and using & to seperate the fields and common words. That didn't work either :(, Can this be done?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi NavyJoe, your field is almost there but you need to make it an expression. Set the Control Source to be:
="Recommendation for Award of the " & [AWARD_LONG] & " ( [AWARD] ) to " & [RANK SHORT] & " " & [FIRST NAME] & " " & [MI] & " " & [LAST NAME] & ", " & [BRANCH] & ", for the Period of " & Format([DATE FROM],"mm/dd/yyyy") & " to " & Format([DATE TO] ,"mm/dd/yyyy")

Basically, all the text bits are in quotes with spaces where required, and the fields are joined on using the ampersand (as you mentioned) -- but you need the starting = sign. The dates are formatted so you get the desired output. Hope this helps

Denis
 
Upvote 0
I put that exact code in (except for the names of the fields (some were on the other form). Anyway, It works but it only adds the fields that are on the Award Log Form. When you press the SSS Verification Form Button (opens up SSS Verification Form), The subject only shows the quoted words and the fields from the other form. But when I click on each of the fields that are in the Subject field, they get added into the Subject field.
 
Upvote 0
If you've got fields on another form you have to provide the full reference: Forms![MyOtherFormName]![MyField] -- and the other form needs to be open.

See how that helps ---

Denis
 
Upvote 0

Forum statistics

Threads
1,221,841
Messages
6,162,314
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top