Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42412

I dont understand my errors

$
0
0
I am working on final unit assignment for my visual basic class. I am confused by this assignment. I have four errors that keep me from compiling. Error '______' is not a member of 'WindowsApplication1.Client'. Insert firstname, lastname, account and balance for each. They appear in last paragraph (display information). I thought I was identifying each up at top, or do I need to identify each again? Please excuse typos as my husband got me a laptop in Japan and the keyboard does not match up to keys which slows me at this class looking for characters. Here is what I have.


Public Class AccountInfo

Private clients(0 To 8) As Client
Private position As Integer = 0

Private Sub AccountInformationForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim count As Integer
Dim firstName() As String = New String() {"Stacy", "Kim", "Pirannah", "Nag", "Qu", "Izzy", "Matt", "Mark", "Milton"}
Dim lastName() As String = New String() {"King", "Sonny", "Dillema", "Dice", "Straw", "Picard", "Tarantulla", "Targus", "Balk"}
Dim account() As Integer = New Integer() {1234567, 7654321, 1726354, 7162534, 1425367, 7463521, 4736251, 6352417, 7643521}
Dim balance() As Decimal = New Decimal() {Convert.ToDecimal(2.83), Convert.ToDecimal(1023.55), Convert.ToDecimal(588.66), Convert.ToDecimal(152.98), Convert.ToDecimal(5096.55), Convert.ToDecimal(823.74), Convert.ToDecimal(7783.23), Convert.ToDecimal(39.12), Convert.ToDecimal(1123.65)}

For count = 0 To clients.GetUpperBound(0)

clients(count) = New Client(firstName(count), lastName(count), account(count), balance(count))
Next

End Sub

Private Sub nextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nextButton.Click
position += 1

If position > clients.GetUpperBound(0) Then
position = 0
DisplayInformation()
Else
DisplayInformation()
End If
End Sub


Private Sub previousButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles previousButton.Click

position -= 1
If position < 0 Then
position = clients.GetUpperBound(0)
DisplayInformation()
Else
DisplayInformation()
End If

End Sub

Private Sub DisplayInformation()
firstNameTextBox.Text = clients(position).firstName
lastNameTextBox.Text = clients(position).lastName
accountTextBox.Text = Convert.ToString(clients(position).account)
balanceTextBox.Text = String.Format("{0:C}", clients(position).balance)

End Sub

End Class

Viewing all articles
Browse latest Browse all 42412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>