Jewel142
ISP
- Jun 17, 2009
- 39
Hi Everyone,
I've just started working with arrays and I can't seem to get it to work properly. The first item saves just find but my array keeps overwritting itself. Any suggestions?
-----------------------
'Declare Arrays A_{Array Name}
Private A_EE_NBR(0) As Integer
Private EE_COUNTER As Integer = A_EE_NBR.GetUpperBound(0)
Private NBR_EE As Integer
Private NEXT_ID As Integer
Private A_FIRSTNAME(15) As String
Private A_LASTNAME(15) As String
Private A_SSN(15) As String
Private A_HRLYRATE(15) As String
'***PRIVATE SUB PROCEDURE TO ADD LINE ITEMS TO ARRAY***
Private Sub Add_To_Array()
Dim EE_NBR As Integer
Dim i As Integer
For i = 0 To A_EE_NBR.Count + 1
Next i
A_FIRSTNAME(0) = firstNameTextBox.Text
A_LASTNAME(0) = lastNameTextBox.Text
A_SSN(0) = ssnTextBox.Text
A_HRLYRATE(0) = hourlyRateTextBox.Text
NBR_EE = EE_COUNTER + 1
eeCountTextBox.Text = NBR_EE.ToString("N0")
eeIDTextBox.Text = EE_NBR.ToString("N0")
End Sub
Thanks for your help!
Jewel
I've just started working with arrays and I can't seem to get it to work properly. The first item saves just find but my array keeps overwritting itself. Any suggestions?
-----------------------
'Declare Arrays A_{Array Name}
Private A_EE_NBR(0) As Integer
Private EE_COUNTER As Integer = A_EE_NBR.GetUpperBound(0)
Private NBR_EE As Integer
Private NEXT_ID As Integer
Private A_FIRSTNAME(15) As String
Private A_LASTNAME(15) As String
Private A_SSN(15) As String
Private A_HRLYRATE(15) As String
'***PRIVATE SUB PROCEDURE TO ADD LINE ITEMS TO ARRAY***
Private Sub Add_To_Array()
Dim EE_NBR As Integer
Dim i As Integer
For i = 0 To A_EE_NBR.Count + 1
Next i
A_FIRSTNAME(0) = firstNameTextBox.Text
A_LASTNAME(0) = lastNameTextBox.Text
A_SSN(0) = ssnTextBox.Text
A_HRLYRATE(0) = hourlyRateTextBox.Text
NBR_EE = EE_COUNTER + 1
eeCountTextBox.Text = NBR_EE.ToString("N0")
eeIDTextBox.Text = EE_NBR.ToString("N0")
End Sub
Thanks for your help!
Jewel