I have the following calculated fields that I want added together to get one total DebitDocTotal and CreditDocTotal.
I have the totals from one form that I want added together with totals from another form to get one total Debit and Credit that will be written out to a text file.
Me.MaskedDebitDocTotal.Text = CType(JVFORM.MaskedDebitDocTotal.Text, Decimal) + TotalDebit.Text
Me.MaskedCreditDocTotal.Text = CType(JVFORM.MaskedCreditDocTotal.Text, Decimal) + TotalCredit.Text
The Totals will be written out to a text file with this formatting:
DebitDocTotal = Microsoft.VisualBasic.Right("00000000000000" & Microsoft.VisualBasic.Left(Me.MaskedDebitDocTotal.Text.ToString, InStr(Me.MaskedDebitDocTotal.Text.ToString, ".") - 1) & _
Microsoft.VisualBasic.Right(Me.MaskedDebitDocTotal.Text.ToString, 2), 14)
CreditDocTotal = Microsoft.VisualBasic.Right("00000000000000" & Microsoft.VisualBasic.Left(Me.MaskedCreditDocTotal.Text.ToString, InStr(Me.MaskedCreditDocTotal.Text.ToString, ".") - 1) & _
Microsoft.VisualBasic.Right(Me.MaskedCreditDocTotal.Text.ToString, 2), 14)
1000.00 + 1000.00
would be written out as 00000000200000
I believe I have coded these incorrectly above. The formatting for DebitDocTotal and CreditDocTotal might be correct.
jjc3397
I have the totals from one form that I want added together with totals from another form to get one total Debit and Credit that will be written out to a text file.
Me.MaskedDebitDocTotal.Text = CType(JVFORM.MaskedDebitDocTotal.Text, Decimal) + TotalDebit.Text
Me.MaskedCreditDocTotal.Text = CType(JVFORM.MaskedCreditDocTotal.Text, Decimal) + TotalCredit.Text
The Totals will be written out to a text file with this formatting:
DebitDocTotal = Microsoft.VisualBasic.Right("00000000000000" & Microsoft.VisualBasic.Left(Me.MaskedDebitDocTotal.Text.ToString, InStr(Me.MaskedDebitDocTotal.Text.ToString, ".") - 1) & _
Microsoft.VisualBasic.Right(Me.MaskedDebitDocTotal.Text.ToString, 2), 14)
CreditDocTotal = Microsoft.VisualBasic.Right("00000000000000" & Microsoft.VisualBasic.Left(Me.MaskedCreditDocTotal.Text.ToString, InStr(Me.MaskedCreditDocTotal.Text.ToString, ".") - 1) & _
Microsoft.VisualBasic.Right(Me.MaskedCreditDocTotal.Text.ToString, 2), 14)
1000.00 + 1000.00
would be written out as 00000000200000
I believe I have coded these incorrectly above. The formatting for DebitDocTotal and CreditDocTotal might be correct.
jjc3397