473,472 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to display more than one variable on a label?

3 New Member
Here is my coding, if it helps. I need an answer quick as it's for an assignment at school. I've reviewed this over and over again and I just can't seem to find out what I did wrong....

The
Dim xx As String
coding is under the public form, while the rest is under the button click.

Me.txtCrust.Text = strCrust
Me.txtTopping1.Text = strTop1
Me.txtTopping2.Text = strTop2

Me.lblOrder.Text = ("Your order is the following: " & vbNewLine & "" & vbNewLine & "" & strCrust & " style crust" & vbNewLine & "with " & strTop1 & " as the first topping" & vbNewLine & "and " & strTop2 & " as the second topping")
Feb 21 '13 #1
2 1264
Viper21
3 New Member
Expand|Select|Wrap|Line Numbers
  1.  Me.txtCrust.Text = strCrust
  2.         Me.txtTopping1.Text = strTop1
  3.         Me.txtTopping2.Text = strTop2
  4.  
  5.         Me.lblOrder.Text = ("Your order is the following: " & vbNewLine & "" & vbNewLine & "" & strCrust & " style crust" & vbNewLine & "with " & strTop1 & " as the first topping" & vbNewLine & "and " & strTop2 & " as the second topping")
This is the coding with the CODE tags, makes it easier to read.
Feb 21 '13 #2
Viper21
3 New Member
SOLVED: Just in case anyone was wondering, I figured out what I did wrong and I feel I should post it here so anyone else in a similar predicament can simply view the solution online.

I said Me.txtCrust.Text was strCrust, meaning the value for that was strCrust, not the value of strCrust was Me.txtCrust.Text

Simple turn it around and instead of putting
Expand|Select|Wrap|Line Numbers
  1. Me.txtCrust.Text = strCrust
put
Expand|Select|Wrap|Line Numbers
  1. strCrust = Me.txtCrust.Text
Feb 21 '13 #3

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

Similar topics

3
by: d2bishop | last post by:
Hi, I am programmatically setting the .Text property of a number of Labels on my Windows form at runtime, but I am experiencing some very strange behaviour when I do this. The code I am using...
4
by: What-a-Tool | last post by:
I want to display a session variable as a textbox value: <input type="text" ...... value="<%=Session("myvar")%>"> I've tried several different variation of this and can't get it to display...
1
by: Arash | last post by:
hi, I read couple of emails in the group regarding using the form to display a message (instead of MsgBox which needs user input to be closed). I'm not very familiar with forms, I would...
2
by: tshad | last post by:
Is there another way to put labels on a page other than asp:label? I have been building a page where I use a label to display the calculated result of some imput. I do it using Javascript. But...
8
by: Ankit Aneja | last post by:
I'm trying to use a for() loop to go through a set of labels and set their visibility to false. I had to do something like Code: for(int i=1;i<=10;i++) { labeli.visible = false;
1
by: Miguel Dias Moura | last post by:
Hello, I am working in ASP.NET/VB. I have a string created by a script. How can i display the content of that string when the page is loaded so i can check its value? Thanks, Miguel
3
by: c676228 | last post by:
Hi everyone, I have a piece of code in sales.aspx.vb like this: Protected WithEvents Message As System.Web.UI.WebControls.Label Try ... ChartImage.ImageUrl = "ChartGenerator.aspx?" + DataStr +...
0
by: veenna | last post by:
I have one label in template coloumn of datagrid ,i want to apply backcolor to the label according to the color selected from database as(Red,Blue)etc . how to bind color field to this label...
1
by: Tony Bansten | last post by:
Sorry for this newbie question, but how do I display a variable value from a *.vbs script in a dialog box and - secondly - how to read a user input from a dialog entry field into a *.vbs script...
2
by: jay123 | last post by:
Hello, I am making a project in VS2008, C#. Background of prob: I have integrated a postcode(UK- its like if someone enters postcode and clicks button to retrieve the address, he gets all the...
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...
0
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
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
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.