adding Text to the beginning of a control source

E

Emma

I want to say
="HELP"&Format([Session Start Date 2],"yyyy\:mm") & [ID]
I want the word HELP then the start date 2 and finally the ID
ie: HELP2010:12430
How do I put the text at the beginning?
 
B

Beetle

Where are you putting this?

In the Control Source of control on a form/report?

Then it should work as posted provided that [Session Start Date 2]
and [ID] are in the object's record source.

In a query?

Then you just need a field alias and drop the = sign;

MyHelpText: "HELP" & Format([Session Start Date 2],"yyyy\:mm") & [ID]
 
J

John W. Vinson

I want to say
="HELP"&Format([Session Start Date 2],"yyyy\:mm") & [ID]
I want the word HELP then the start date 2 and finally the ID
ie: HELP2010:12430
How do I put the text at the beginning?

What you proposed should work correctly, if it's in the Control Source of the
textbox. I'd add some blanks:

="HELP" & Format([Session Start Date 2],"yyyy\:mm") & [ID]

If this isn't working for you please amplify - what's the context? Is this on
a Form, a Report, in a query? What error are you getting?
 
E

Emma

This is the control source in a subform :

I tried slimming it down using fields in the subform
[Financial ID]:Format([DateofLoanAgreementSigned],"yyyy\:mm") & [ID]

because Session Start Date 2 isn't in the subform table. So what do you
think I should do it's saying Expressions must begin with an ='s sign

So when I try =Format([DateofLoanAgreementSigned],"yyyy\:mm") & [ID]
it says Circular Reference

Beetle said:
Where are you putting this?

In the Control Source of control on a form/report?

Then it should work as posted provided that [Session Start Date 2]
and [ID] are in the object's record source.

In a query?

Then you just need a field alias and drop the = sign;

MyHelpText: "HELP" & Format([Session Start Date 2],"yyyy\:mm") & [ID]

--
_________

Sean Bailey


Emma said:
I want to say
="HELP"&Format([Session Start Date 2],"yyyy\:mm") & [ID]
I want the word HELP then the start date 2 and finally the ID
ie: HELP2010:12430
How do I put the text at the beginning?
 
H

Hans Up

Emma said:
This is the control source in a subform :

I tried slimming it down using fields in the subform
[Financial ID]:Format([DateofLoanAgreementSigned],"yyyy\:mm") & [ID]

because Session Start Date 2 isn't in the subform table. So what do you
think I should do it's saying Expressions must begin with an ='s sign

So when I try =Format([DateofLoanAgreementSigned],"yyyy\:mm") & [ID]
it says Circular Reference

What is the name of the control whose source you want to modify? If it
is either DateofLoanAgreementSigned or ID, I don't think it will work.
 
E

Emma

Thanks John it's working now that I called the textbox Financial ID and used
ID as the reference it stopped the circular reference. Thanks so much!

John W. Vinson said:
I want to say
="HELP"&Format([Session Start Date 2],"yyyy\:mm") & [ID]
I want the word HELP then the start date 2 and finally the ID
ie: HELP2010:12430
How do I put the text at the beginning?

What you proposed should work correctly, if it's in the Control Source of the
textbox. I'd add some blanks:

="HELP" & Format([Session Start Date 2],"yyyy\:mm") & [ID]

If this isn't working for you please amplify - what's the context? Is this on
a Form, a Report, in a query? What error are you getting?
 

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