473,769 Members | 8,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

txtboxSearchCri teria = [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 2190
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******@pcdata sheet.com
www.pcdatasheet.com

"N. Graves" <ng*****@yahoo. com> wrote in message
news:97******** *************** *********@4ax.c om...
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

txtboxSearchCri teria = [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

txtboxSearchCri teria = [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.co m> 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

txtboxSearchCri teria = [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!Som eTextBoxValue
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
3779
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 datediff from the subform.I have set the controls source = .Form! FRM- TimeSheet Subform is the name of the subform and TXTTtalHoursworked is the name of the unbound field in the subform.
2
3892
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 DAO Append Query that has a parameter that is passed from the text box using parameter of DAO QueryDef object. I adjusted B7 parameter (Text as LongVarchar) in connection string (ODBC driver) to 1, so that Access links PostgreSQL Text fields as...
2
8264
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 this all from the control source of the unbound text box. What I think it should look like is something like this; If(DateDiff("d",,)) > 5, Then Display "On Time"
5
1338
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 meaning. Let say, "1" means "employed" and "2" means "unemployed". I would like to convert the "1" and "2" values to "employed" and "unemployed" for the feild in the table. I tried using the IIF Function, but because it is used with numerical...
11
5189
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 button will open a new form (Form2). Form2 has two subforms. Both are embedded in the main form. (Subform2 is NOT embedded in subform1.) Subform1 displays records as a continuous form based on the Primary ID of the main form and lists the...
1
2250
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 somehow have the total form the unbound text box transferred to it. How do I go about this? I have multiple categories that can be selected through a combo box. So I am sometime just flipping through categories to see what my total is. I could just...
4
4033
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 called purchase_register_details, In sub form i have a unbound textfield called txt_Total_Amount where in i am calculating total amount for different items purchased by giving following code in control source. ContolSource: =Sum() In my main form i...
9
2229
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 the value that is entered into the bound text box is less than or equal to 100, then that value is put into the unbound text box and if the value is greater than 100 use the equation I already have. I dont have much experience with this type of thing....
2
3208
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 have a form for machine operator tracking. The form shows training-stage tracking dates with a lot of performance information. On the form is a subform for reviews, which uses a set of unbound text boxes to show current data for a review, which is...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.