473,660 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Easy need to add ddl to loop

Hi!

The following loop works great, but I want to add the following to it,
but not sure how since the others are textboxes and this is a
dropdownlist (ddl).

txtinvloc.Selec tedItem.Value

for i = 0 to 14
'Dim strNumber as string =
sender.Name.Sub string(Len("txt acctnum"))
Dim tb as TextBox
Dim tc as TextBox
Dim td as TextBox
Dim te as TextBox

if i = 0 then
'Looks for the txtacctnum
'loops through all txtacctnum, checking
txtacctnum, txtacctnum1, ... txtactnum14
tb = CType(FindContr ol("txtAcctNum" ),
TextBox)
tc = CType(FindContr ol("txtCostCntr "),
TextBox)
td = CType(FindContr ol("txtRefNum") ,
TextBox)
te = CType(FindContr ol("txtAcctAmt" ),
TextBox)

else
'Looks for txtacctnum0 - txtacctnum14
tb = CType(FindContr ol("txtAcctNum " & i),
TextBox)
tc = CType(FindContr ol("txtCostCntr " & i),
TextBox)
td = CType(FindContr ol("txtRefNum" & i),
TextBox)
te = CType(FindContr ol("txtAcctAmt " & i),
TextBox)
End If
if (Not IsNothing(tb)) AndAlso len(tb.Text) >
0 then
Also how do I display it later on in my case statement?
this is how the other was used:
If tc.Text = "" Then
lblResult3.Text = "Please enter
a cost center."

elseif txtinvloc.Selec tedItem.Value =
"081" <<<<<------how do I display
I tried selected.item.v alue and others but I need to figure it
out...thanks!!! I don't want to rewrite the code, just add that
line...thanks!! !
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
1 1074


I figured it...so please ignore this post.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3198
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is indeed also true for our language of choice, Python. Its file type allows some extraordinary convenient access like: for line in open("blah"): handle_line(line)
5
5151
by: Mike | last post by:
I'm having problem using strConv("john", 3) to generate a propercase version of john. does strConv not work in ASP??? Any advise is greatly appreciated. Thanks, Mike
5
19548
by: Ken Fine | last post by:
Suppose I've built a recordset. I want some code to run for each record in the recordset in a "loop." In ASP VBScript, how would you express the following: For each in next The only thing I'm really fuzzy on is the syntax for describing each recordset row. Thanks for any help.
5
1552
by: Harold Howe | last post by:
Howdy, 1- Are property reads in effect volatile? Or is the compiler allowed to optimize property reads away? ie class foo { public int bar { get { return m_bar;}
1
1398
by: DaVinci | last post by:
I did a google web & group search and didn't find an answer to my question so... here we go. Will try to keep it short. (I am not a complete beginner but am still pretty low on the food chain). Two programs on two different machines. Program 1 is given values for multiple variables. Program 1 then sends everything to Program 2 in an ascii character format. Program 2 then needs to parse the input buffer, extract the type of data and...
5
1445
by: greg | last post by:
I'm sure this is easy - if someone could give me a push in the right direction I would apprieciate it! If you have multiple categories CatID - NAME - ParentID 1 root 0 2 fruit 0 3 veg 0 4 apple 2
9
1302
by: Mark Walsh | last post by:
The following is an explanation of a bug that exists in the VB.NET compiler. I've tried to report it to Microsoft, but they've made it so difficult I've given up: MSDN help states that variables are initialised when they are created. This seems to be true for the following code which produces "1","2","3","4","5". (ie the variable is created when a procedure is entered and not when for-loop is entered) For i = 1 To 5
6
1313
by: Mark Walsh | last post by:
The following is an explanation of a bug that exists in the VB.NET compiler. I've tried to report it to Microsoft, but they've made it so difficult I've given up: MSDN help states that variables are initialised when they are created. This seems to be true for the following code which produces "1","2","3","4","5". (ie the variable is created when a procedure is entered and not when for-loop is entered) For i = 1 To 5
6
1492
by: Shisou | last post by:
Hey guys, This should be easy but I need a little help. This is in C... I have an array or ints I need to put something at the end that I can find to stop a loop... I tried using '\0' or setting it to NULL, but those seem to translate to 0... which doesn't work for me. any help is appreciated!
0
8754
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8630
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
7362
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
6181
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
5650
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2760
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
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
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.