Adding specific text to a report at run time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Just add an unbound text box to your report.

Put something like the following...

=[Enter Text To Print Here]
 
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
 
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 "
 
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
 
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
 
Back
Top