473,382 Members | 1,290 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,382 software developers and data experts.

How can I refer a label by concantenating its name property

I have a problem in passing a text value of a label named lbl_hours_1 up to lbl_hours_32 in form frm_main to a label named lbl_swap_hours_1 up to lbl_swap_hours_32 in form frm_swap_room,it always shows an null reference error

this is the code I used, I put it in a Module named Mod_swap_room to be called on a button in frm_swap_room

Expand|Select|Wrap|Line Numbers
  1.             For x As Integer = 1 To 32
  2.             frm.controls("lbl_swap_hours_" & x).text = frm_main.Controls("lbl_hours_" & x).Text
  3.         Next x
  4.  
May 3 '13 #1
2 976
I need to know the alternative codes because I will swap the value of each hours depending of the input of a two textboxes
May 3 '13 #2
Rabbit
12,516 Expert Mod 8TB
And what problem are you having with that code? Are you getting error messages? What are they?
May 4 '13 #3

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

Similar topics

6
by: Java script Dude | last post by:
We just discovered another IE bug. When an html form contains an element with a name of `name` IE's internal index screws up the .name property of the containing form to point to the bad element...
1
by: Kun | last post by:
Hi there, I think vs.net missing default name for new form. Scenario: 1. I create new Window Application by default it give me Form1 2. I add Form2 3. In Form1_Load event I try to get form2...
9
by: Rakesh | last post by:
Hi, I am able to obtain a MenuItem object's Name property @ design-time, but am not able to get the same @ run- time...why? And since MenuItem doesn't inherit from Control class, it's not...
4
by: Weinand Daniel | last post by:
i'd like to monitor changes of the "Control.Name" porperty during designtime. if the user changes the name in designer my event musst fire. i have created a own button control. with an event...
5
by: Barry Gast | last post by:
Hi. I am trying to access the names of the toolbar buttons in order to match to correct button name passed to a function. However, there is no ..Name property on a ToolBarButton control. Is...
7
by: Mike Owen | last post by:
I have a vb.net page that uses a form as below: <form id="Visual" name="Visual" method="post" runat="server"> If I run this on my Windows XP development PC then the HTML generated from it is:...
10
by: Rob | last post by:
I am reading a book that says that the "name" property can be altered only at design time and cannot be modified at runtime. Please explain this given the code below... If you click Button3......
1
by: kostareject | last post by:
Hello! Can anyone tell me how can I printi label/textbox Text property in MDI Child by clicking MDI Parent print button in C#! I have MDI Chil form with several labels and textboxes, and I want...
0
by: kostareject | last post by:
Hello! Can anyone tell me how can I printi label/textbox Text property in MDI Child by clicking MDI Parent print button in C#! I have MDI Chil form with several labels and textboxes, and I want...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
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...

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.