Jump to content
Xtreme .Net Talk

UberDan

Members
  • Posts

    3
  • Joined

  • Last visited

UberDan's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Oops, my mistake.... VB .NET As for that bit of code, I'm not sure I understand it. This is what it needs it to do: Dim intCounter As Int Dim strSeatName As String For intCounter = 1 To 18 Step 1 strSeatName = "lblSeat" & intCounter DsSeating1.Clear() OleDbDataAdapter1.SelectCommand.CommandText = "select * from seating where seat_no = " & intCounter & " and perf_date = '" & lstDate.Text & "'" OleDbDataAdapter1.Fill(DsSeating1) If DsSeating1.Tables(0).Rows.Count = 0 Then (strSeatName data should be here).BackColor = System.Drawing.Color.LawnGreen (strSeatName data should be here).ForeColor = System.Drawing.Color.Black End If Next
  2. Yeah, I talked to my professor and he's not looking for anything pretty, which is good because I now have 18 If / ElseIf checks controlling it instead of a simple For loop. lol Curse you, VB!
  3. Ok, so I have a string variable (strSeatName) that holds the name of a label (lblSeat1) and I'm trying to change the color of that label without hard-coding the label name in the command (since it's inside a For loop that changes multiple labels named lblSeat1, lblSeat2, lblSeat3, etc...). Here is the command I need to use: lblSeat1.BackColor = System.Drawing.Color.LawnGreen Except that I need to get the part where it says "lblSeat1" out of the string variable. I'm sure this is easy. I'm just a n00b. Suggestions?
×
×
  • Create New...