Adding specific text to a report at run time

T

tashipete

All,

I'd like to add specific text to a report at run time via a prompt. That
is, when I open the report I'd like it to prompt me for the text then place
this value in the report. The on open sub function does not return
variables, and I cannot seem to assign a global variable that survives to be
the control of a text box.

Any help would be appreciated.

Thanks,
Pete
 
R

Rick B

Just add an unbound text box to your report.

Put something like the following...

=[Enter Text To Print Here]
 
M

margaret

I'm having the same problem. I would like the report to ask for month to
appear in the report header. I've put an unbound text box and here it is.
="FOR THE " & [Month] & "MONTHS ENDED "

However, it's giving me a #Name? error

Duane Hookom said:
You can try add a text box to a text box like:
=[Enter your text here]

--
Duane Hookom
MS Access MVP
--

tashipete said:
All,

I'd like to add specific text to a report at run time via a prompt. That
is, when I open the report I'd like it to prompt me for the text then
place
this value in the report. The on open sub function does not return
variables, and I cannot seem to assign a global variable that survives to
be
the control of a text box.

Any help would be appreciated.

Thanks,
Pete
 
F

fredg

I'm having the same problem. I would like the report to ask for month to
appear in the report header. I've put an unbound text box and here it is.
="FOR THE " & [Month] & "MONTHS ENDED "

However, it's giving me a #Name? error

Duane Hookom said:
You can try add a text box to a text box like:
=[Enter your text here]

--
Duane Hookom
MS Access MVP
--

tashipete said:
All,

I'd like to add specific text to a report at run time via a prompt. That
is, when I open the report I'd like it to prompt me for the text then
place
this value in the report. The on open sub function does not return
variables, and I cannot seem to assign a global variable that survives to
be
the control of a text box.

Any help would be appreciated.

Thanks,
Pete

You have used Month which is a reserved word. Access thinks you want a
field named Month or the Function Month() and can't find it.
Change it to:

="FOR THE " & [Enter the Month] & " MONTHS ENDED "
 
D

Duane Hookom

1) Does your report return any records
2) Do you have a field in your report's record source named [Month]
3) Is the name of your control the same as the name of a field
4) Why would you want to prompt for a value when your report's recordsource
might already have the value you are prompting for

--
Duane Hookom
MS Access MVP
--

margaret said:
I'm having the same problem. I would like the report to ask for month to
appear in the report header. I've put an unbound text box and here it is.
="FOR THE " & [Month] & "MONTHS ENDED "

However, it's giving me a #Name? error

Duane Hookom said:
You can try add a text box to a text box like:
=[Enter your text here]

--
Duane Hookom
MS Access MVP
--

tashipete said:
All,

I'd like to add specific text to a report at run time via a prompt.
That
is, when I open the report I'd like it to prompt me for the text then
place
this value in the report. The on open sub function does not return
variables, and I cannot seem to assign a global variable that survives
to
be
the control of a text box.

Any help would be appreciated.

Thanks,
Pete
 
T

tashipete

To all who responded,

Thanks!!!!!!!! That was what I was struggling to remember. It works.
Thanks, again.

Pete

Duane Hookom said:
1) Does your report return any records
2) Do you have a field in your report's record source named [Month]
3) Is the name of your control the same as the name of a field
4) Why would you want to prompt for a value when your report's recordsource
might already have the value you are prompting for

--
Duane Hookom
MS Access MVP
--

margaret said:
I'm having the same problem. I would like the report to ask for month to
appear in the report header. I've put an unbound text box and here it is.
="FOR THE " & [Month] & "MONTHS ENDED "

However, it's giving me a #Name? error

Duane Hookom said:
You can try add a text box to a text box like:
=[Enter your text here]

--
Duane Hookom
MS Access MVP
--

All,

I'd like to add specific text to a report at run time via a prompt.
That
is, when I open the report I'd like it to prompt me for the text then
place
this value in the report. The on open sub function does not return
variables, and I cannot seem to assign a global variable that survives
to
be
the control of a text box.

Any help would be appreciated.

Thanks,
Pete
 

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