Adding static text to textbox that displays input data

G

Guest

I have a textbox control that shows me the input the user entered before
running the report (Control source: "[Forms]![UnivCriteriaFrm].[txtFrom]" )
..

How can I add the word "From" in that same textbox? I tried it this way,

Control Source -> ="From: "+[Forms]![UnivCriteriaFrm].[txtFrom]

but I get "#Name?" in the report where the 'From...' should be. What's
wrong?

Thanks.
 
W

Wayne Morgan

Try

="From: " & [Forms]![UnivCriteriaFrm].[txtFrom]

don't forget a space on each side of the &.
 
G

Guest

It still didn't work. In Control source, I typed:

="From: " & [Forms]![UnivCriteriaFrm].[txtFrom]

and I still get "#Name?" in the space where the info should be.

But if I only write:
Forms!UnivCriteriaFrm.txtFrom

it displays it correctly.
What could it be?

VM

Wayne Morgan said:
Try

="From: " & [Forms]![UnivCriteriaFrm].[txtFrom]

don't forget a space on each side of the &.


--
Wayne Morgan
Microsoft Access MVP


I have a textbox control that shows me the input the user entered before
running the report (Control source: "[Forms]![UnivCriteriaFrm].[txtFrom]" )
.

How can I add the word "From" in that same textbox? I tried it this way,

Control Source -> ="From: "+[Forms]![UnivCriteriaFrm].[txtFrom]

but I get "#Name?" in the report where the 'From...' should be. What's
wrong?

Thanks.
 
W

Wayne Morgan

Good question, because if I leave out the =, then I get #Name?. I have to put in the = and
when I do, Access automatically puts in the brackets.

The only thing I can think of is that the field and the text box on UnivCriteriaFrm are
BOTH called txtFrom and so Access doesn't know which to use.
 

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