D
Derrick Candler
I'll try to explain this in plain english as possible.
I have a listbox with the following values
These are know as Employee ID's
101
112
203
301
302
I need to be able to select the Employee ID
Then
Enter a Dollar Amount into a TextBox
Then
Click a Button to Add it Sales Amount to An Array.
If I select another employee ID that amount needs to be added to the
same array with the same button.
The Amount need to be able to compound
Then
The Array must be displayed in a Textbox in the following format
101 1,500
112 1,675
203 4,520
301 6,000
302 3,500
Total: $17,1795
I understand that I need to create an Array
Static SalesAmts(4) As Double
Dim Sale As Double
Dim ID As Integer
Double.TryParse (Textbox1.Text, Sale)
ID = ListBox.SelectedIndex
Update the Array
SalesAmts(ID) += Sale
But for some reason it doesn't seem right.....Can someone please
ellaborate in lamens terms how this is suppose to work. Yes this is
for homework, unfortunately the book failed to provide and exaxmple of
how to populate an array from a textbox and display it in another
textbox. While the amounts continue to compoud on top of each other.
Thank you any help is greatly appreciated.
I have a listbox with the following values
These are know as Employee ID's
101
112
203
301
302
I need to be able to select the Employee ID
Then
Enter a Dollar Amount into a TextBox
Then
Click a Button to Add it Sales Amount to An Array.
If I select another employee ID that amount needs to be added to the
same array with the same button.
The Amount need to be able to compound
Then
The Array must be displayed in a Textbox in the following format
101 1,500
112 1,675
203 4,520
301 6,000
302 3,500
Total: $17,1795
I understand that I need to create an Array
Static SalesAmts(4) As Double
Dim Sale As Double
Dim ID As Integer
Double.TryParse (Textbox1.Text, Sale)
ID = ListBox.SelectedIndex
Update the Array
SalesAmts(ID) += Sale
But for some reason it doesn't seem right.....Can someone please
ellaborate in lamens terms how this is suppose to work. Yes this is
for homework, unfortunately the book failed to provide and exaxmple of
how to populate an array from a textbox and display it in another
textbox. While the amounts continue to compoud on top of each other.
Thank you any help is greatly appreciated.