By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,501 Members | 831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,501 IT Pros & Developers. It's quick & easy.

Help: I need help set an unbound text box

P: n/a
Hello, Please help me I'm still a newbie.

I have an unbound text box on a report that I would like to build a
expression to display it on the report. Something like

txtboxSearchCriteria = [Forms]![frm_PartsSearch]![txtMaterial] in the
OnPage Event and sometime this will work and sometime it will not.

Is there a better simpler way?

Norris
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Put your code in the Report Header's Print event.

Note: Be aware that frm_PartsSearch must be open (can be not visible) when your
report opens or you will get the parameter message asking for input.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"N. Graves" <ng*****@yahoo.com> wrote in message
news:97********************************@4ax.com...
Hello, Please help me I'm still a newbie.

I have an unbound text box on a report that I would like to build a
expression to display it on the report. Something like

txtboxSearchCriteria = [Forms]![frm_PartsSearch]![txtMaterial] in the
OnPage Event and sometime this will work and sometime it will not.

Is there a better simpler way?

Norris

Nov 12 '05 #2

P: n/a
"N. Graves" wrote:
Hello, Please help me I'm still a newbie.

I have an unbound text box on a report that I would like to build a
expression to display it on the report. Something like

txtboxSearchCriteria = [Forms]![frm_PartsSearch]![txtMaterial] in the
OnPage Event and sometime this will work and sometime it will not.

Is there a better simpler way?

Norris


Why not put that text bos either in the report header (prints once) or
the page header (prints every page) and forget the OnPage code?
Nov 12 '05 #3

P: n/a
I seem to have some success when I used the Onpage Event. I really
did not know what it was for.

I have the text box in the header of the page but I have display the
data the way I want to.

Details:
I open the report which opens a form. This form has search
fields(unbound but name txtMaterial txt oldMaterial). When you make
your choices then click a button I pass the data to the report via a
query. I can display the fields on the report but I want is an
formatted sort of way. I'm wanting to use an IF statement to see if
the field is empty and if it is not then add some text and space to
the field to display.
Any other suggestions?


On Mon, 19 Jan 2004 21:35:24 GMT, Salad <oi*@vinegar.com> wrote:
"N. Graves" wrote:
Hello, Please help me I'm still a newbie.

I have an unbound text box on a report that I would like to build a
expression to display it on the report. Something like

txtboxSearchCriteria = [Forms]![frm_PartsSearch]![txtMaterial] in the
OnPage Event and sometime this will work and sometime it will not.

Is there a better simpler way?

Norris


Why not put that text bos either in the report header (prints once) or
the page header (prints every page) and forget the OnPage code?


Nov 12 '05 #4

P: n/a
"N. Graves" wrote:
I seem to have some success when I used the Onpage Event. I really
did not know what it was for.

I have the text box in the header of the page but I have display the
data the way I want to.

Details:
I open the report which opens a form. This form has search
fields(unbound but name txtMaterial txt oldMaterial). When you make
your choices then click a button I pass the data to the report via a
query. I can display the fields on the report but I want is an
formatted sort of way. I'm wanting to use an IF statement to see if
the field is empty and if it is not then add some text and space to
the field to display.

Any other suggestions?


If you need formatted data, if I understand you correctly, I may create a
text box in the report and create a function and make it the control
source. Ex:
=GetSum()

Private Function GetSum()
GetSum = Forms!Main!Val1 + FormsMain!Val2
End Function

The control source is =GetSum()
The name of the control may be GetSumValue

I'd do that if I can't simply enter
=Forms!Main!SomeTextBoxValue
as the control source.

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.