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!