Click here to Skip to main content
15,896,207 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Question About this Function Pin
CHACAMAN3-Sep-12 13:43
CHACAMAN3-Sep-12 13:43 
GeneralRe: Question About this Function Pin
CHACAMAN3-Sep-12 15:25
CHACAMAN3-Sep-12 15:25 
GeneralRe: Question About this Function Pin
Dave Kreskowiak4-Sep-12 9:34
mveDave Kreskowiak4-Sep-12 9:34 
GeneralRe: Question About this Function Pin
CHACAMAN4-Sep-12 12:06
CHACAMAN4-Sep-12 12:06 
QuestionFill Datagridview in one form From Another Datagridview Form Pin
Member 16002102-Sep-12 23:03
Member 16002102-Sep-12 23:03 
AnswerRe: Fill Datagridview in one form From Another Datagridview Form Pin
Sonhospa3-Sep-12 6:31
Sonhospa3-Sep-12 6:31 
AnswerRe: Fill Datagridview in one form From Another Datagridview Form Pin
wkalo5-Sep-12 9:33
wkalo5-Sep-12 9:33 
QuestionText_Changed Calculation error Pin
garyu871-Sep-12 20:24
garyu871-Sep-12 20:24 
Quote:
Private Sub txtLunch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLunch.TextChanged
If Not String.IsNullOrEmpty(txtLunch.Text) Then
If txtLunch.Text >= 0 Then
Lunch = txtLunch.Text

SubFnB = Breakfast + Lunch + Dinner + Supper + Snack + Beverage + Grocerries
txtSubFnB.Text = SubFnB
End If
End If
End Sub

Private Sub txtDinner_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtDinner.TextChanged
If Not String.IsNullOrEmpty(txtDinner.Text) Then
If txtDinner.Text >= 0 Then
Dinner = txtDinner.Text

SubFnB = Breakfast + Lunch + Dinner + Supper + Snack + Beverage + Grocerries
txtSubFnB.Text = SubFnB
End If
End If
End Sub

Private Sub txtSupper_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSupper.TextChanged
If Not String.IsNullOrEmpty(txtSupper.Text) Then
If txtSupper.Text >= 0 Then
Supper = txtSupper.Text

SubFnB = Breakfast + Lunch + Dinner + Supper + Snack + Beverage + Grocerries
txtSubFnB.Text = SubFnB
End If
End If
End Sub

Private Sub txtSnack_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSnack.TextChanged
If Not String.IsNullOrEmpty(txtSnack.Text) Then
If txtSnack.Text >= 0 Then
Snack = txtSnack.Text

SubFnB = Breakfast + Lunch + Dinner + Supper + Snack + Beverage + Grocerries
txtSubFnB.Text = SubFnB
End If
End If
End Sub

Private Sub txtBeverage_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBeverage.TextChanged
If Not String.IsNullOrEmpty(txtBeverage.Text) Then
If txtBeverage.Text >= 0 Then
Beverage = txtBeverage.Text

SubFnB = Breakfast + Lunch + Dinner + Supper + Snack + Beverage + Grocerries
txtSubFnB.Text = SubFnB
End If
End If
End Sub

Private Sub txtGroceries_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtGroceries.TextChanged
If Not String.IsNullOrEmpty(txtGroceries.Text) Then
If txtGroceries.Text >= 0 Then
Grocerries = txtGroceries.Text

SubFnB = Breakfast + Lunch + Dinner + Supper + Snack + Beverage + Grocerries
txtSubFnB.Text = SubFnB
End If
End If
End Sub

Private Sub txtAllowance_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAllowance.TextChanged
If Not String.IsNullOrEmpty(txtAllowance.Text) Then
If txtAllowance.Text >= 0 Then
Allowance = txtAllowance.Text
End If
End If
End Sub

Private Sub txtSubFnB_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSubFnB.TextChanged
If Not String.IsNullOrEmpty(txtSubFnB.Text) Then
If txtSubFnB.Text >= 0 Then
SubFnB = txtSubFnB.Text

Total = SubFnB
txtTotalUsage.Text = Total

txtWalletCash.Text = Wallet
Wallet = (Wallet + Allowance) - Total
End If
End If
End Sub


Sorry for asking so many things.

My SubFnB is displayed correctly but my wallet isn't.

It keeps on multiplying the total
How to fix this?
AnswerRe: Text_Changed Calculation error Pin
garyu871-Sep-12 21:48
garyu871-Sep-12 21:48 
QuestionSecuring Local Files [Solved] Pin
Saul Johnson1-Sep-12 11:59
Saul Johnson1-Sep-12 11:59 
AnswerRe: Securing Local Files Pin
AspDotNetDev1-Sep-12 15:26
protectorAspDotNetDev1-Sep-12 15:26 
GeneralRe: Securing Local Files Pin
Saul Johnson1-Sep-12 23:13
Saul Johnson1-Sep-12 23:13 
GeneralRe: Securing Local Files Pin
dcu.lcr4-Sep-12 4:20
dcu.lcr4-Sep-12 4:20 
GeneralRe: Securing Local Files Pin
Eddy Vluggen4-Sep-12 5:16
professionalEddy Vluggen4-Sep-12 5:16 
GeneralRe: Securing Local Files Pin
dcu.lcr5-Sep-12 2:37
dcu.lcr5-Sep-12 2:37 
GeneralRe: Securing Local Files Pin
Eddy Vluggen5-Sep-12 3:22
professionalEddy Vluggen5-Sep-12 3:22 
AnswerRe: Securing Local Files Pin
Eddy Vluggen1-Sep-12 22:51
professionalEddy Vluggen1-Sep-12 22:51 
GeneralRe: Securing Local Files Pin
Saul Johnson1-Sep-12 23:18
Saul Johnson1-Sep-12 23:18 
GeneralRe: Securing Local Files Pin
Eddy Vluggen2-Sep-12 0:28
professionalEddy Vluggen2-Sep-12 0:28 
AnswerRe: Securing Local Files [Solved] Pin
James H3-Sep-12 22:21
James H3-Sep-12 22:21 
GeneralRe: Securing Local Files [Solved] Pin
Saul Johnson5-Sep-12 4:07
Saul Johnson5-Sep-12 4:07 
AnswerRe: Securing Local Files [Solved] Pin
Stephane Rivette At Motion4-Sep-12 2:07
Stephane Rivette At Motion4-Sep-12 2:07 
GeneralRe: Securing Local Files [Solved] Pin
Eddy Vluggen4-Sep-12 5:15
professionalEddy Vluggen4-Sep-12 5:15 
AnswerRe: Securing Local Files [Solved] Pin
BrainiacV4-Sep-12 8:30
BrainiacV4-Sep-12 8:30 
GeneralRe: Securing Local Files [Solved] Pin
Saul Johnson5-Sep-12 4:05
Saul Johnson5-Sep-12 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.