473,387 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help: I need help set an unbound text box

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
4 2164
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
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dos Lil | last post by:
I have a unbound field in the subform(for calculating the datediff) which has the control property ==DateDiff("n",,). I have another unbound field in the main form which is for displaying the...
2
by: Zlatko Matić | last post by:
Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a...
2
by: hmiller | last post by:
Hope I make my case clear!!! I have a table with two bound date/time fields. I want to be able to use an IF statement and DateDiff to return a text message in an unbound text box. I want to do...
5
by: ALaurie10 | last post by:
Hi In my database, I use data that is imported XML data. One of the feilds in my table has text data defined with only two values -->"1" and "2". These are text values which have specific...
11
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
1
by: MyWaterloo | last post by:
I have an unbound text box on my main form that is used to show the sum totals in my sub form. I also have a field on my main form that has a control source in a table. This bound field needs to...
4
by: sumit kale | last post by:
Hi, Can somebody help me resolve my problem ? I am getting error when calculating total using unbound textfiled in subform. I have a main form called purchase_register_master and a subform...
9
by: sillyr | last post by:
Hi - I have an unbound text box on a form that calculates a value from a bound text box on the same form. Right now the equation I'm using is =Val(NZ())*0.20 but I would like to have it so if...
2
topher23
by: topher23 | last post by:
Disclaimer: I've already come up with a solution for this issue, but I thought I'd post it in the hope that it could help someone else and on the off chance that someone has another solution. I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.