473,503 Members | 1,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to output string to textbox based on criteria

1 New Member
I am very new to access and VBA so please excuse the idiocracy of the question, but, I'm trying to output a string to a bound textbox in a form based on the value of a calculated textbox. So here's what I have so far, and it works in that if I say debug.print it prints to the immediate box but it won't output to the textbox in the form.

Expand|Select|Wrap|Line Numbers
  1. Private Sub LowReg_Click()
  2.  
  3. Dim output As String
  4. Dim ctlLowReg As Control
  5.  
  6.     If [Low Registration Raw] <= 18 Then
  7.          output = "--"
  8.     ElseIf [Low Registration Raw] <= 26 Then
  9.          output = "-"
  10.     ElseIf [Low Registration Raw] <= 40 Then
  11.         output = "="
  12.     ElseIf [Low Registration Raw] <= 51 Then
  13.         output = "+"
  14.     ElseIf [Low Registration Raw] <= 75 Then
  15.          output = "++"
  16.  
  17. End If
  18.  
  19. End Sub
LowRegistration Raw is a calculated field, and I'd like the field LowReg, which also appears as a textbox, to show either "--", "-", "=", "+", or "++" depending on the value of Low Registration Raw.

Thanks!
Feb 28 '13 #1
1 2023
Seth Schrock
2,965 Recognized Expert Specialist
Replace your Output with Me.textbox_name.
Feb 28 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1495
by: chris | last post by:
i have a set od radio buttons what i wanty to do is when one particular button is selected bring up an additional text box for additional information how would i do this
3
2543
by: Brooke | last post by:
I am new to access, so please excuse ignorance. Within my table (contacts) I have a text field (other). What I am trying to do is collect all of the text input from the field 'other', separate each...
6
12573
by: Scott Kilbourn | last post by:
Hi, I'm writing a control that inherits from TextBox. I need to adjust the width of this control based on the number of characters in the control. I'm having a hard time with this. The...
4
1766
by: Sarah | last post by:
Hi - I am extremely new to programming so I apologize in advance for my lack of knowlege, vocabulary and if my code is sloppy. I will take any suggestions to clean up my code and to follow any...
2
2035
by: adambossy | last post by:
I have a nasty situation in SQL Server 7.0. I have a table, in which one column contains a string-delimited list of IDs pointing to another table, called "Ratings" (Ratings is small, containing...
1
14312
by: papalarge | last post by:
Hey all... I've been using the following to calculate the height the textbox needs to be in order to grow it vertically to its necessary size. textbox1.Height =...
3
4778
by: Rebekkah | last post by:
I did a search but couldn't find a question similar to mine. I need to count the values in a textbox on a report and have the count subtotal in a group footer. But I need three different counts on...
1
4863
by: Alexander Vasilevsky | last post by:
Help to develop wrapper for cmd.exe and to redirect all input and output in TextBox. -- http://www.alvas.net - Audio tools for C# and VB.Net developers
2
2462
by: Ruth Barn | last post by:
The issue is that the calculated text box does not actually requery until each of the associated listboxes have been clicked into and exited. I have an unbound form that looks up various pieces of...
0
7201
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
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7456
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...
0
5578
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,...
1
5011
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...
0
3166
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...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
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 ...

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.