Re: return value



"enrico via DotNetMonster.com" <u41845@uwe> wrote in message news:81053df6136d8@xxxxxx
i added a currency sign to my number field which is a "double" field on my
database. this is the code:

Private Sub TextBox11_Leave(ByVal sender As Object, ByVal e As System.
EventArgs) Handles TextBox11.Leave
Dim dblValue As String
If TextBox11.Text.Contains(".") = True Then
dblValue = Format(Val(TextBox11.Text), "P #,###.##")
TextBox11.Text = dblValue
Else
dblValue = Format(Val(TextBox11.Text), "P #,###.00")
TextBox11.Text = dblValue
End If
End Sub

it does work but every time that i save it the value that is returned in my
database is 0. my add code is something like this(only a part of the whole
code):

addValue(Val(TextBox11.Text), "TotalAmount")

--
Message posted via http://www.dotnetmonster.com


Turn on both Option Strict and Option Explicit and see what happens.

.



Relevant Pages

  • return value
    ... Private Sub TextBox11_Leave(ByVal sender As Object, ... Dim dblValue As String ... database is 0. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: event fire
    ... Dim dblValue As Double ... Dim varTargetAmt As Variant ... Private Sub Workbook_SheetChange ...
    (microsoft.public.excel.programming)
  • Re: event fire
    ... Dim dblValue As Double ... Dim varTargetAmt As Variant ... Private Sub Workbook_SheetChange ...
    (microsoft.public.excel.programming)
  • Re: "Overflow Error" - need help please.
    ... Okay, so the Overflow Error happens in the form, even when it has NO code. ... Then compact the database: ... INSERT INTO tblContacts (ctEnteredDate, ctPeopleSoftID, ctLastName1, ... Private Sub Form_Current ...
    (microsoft.public.access.modulesdaovba)
  • RE: Error 2455 on close of db
    ... occurs when you exit this form in this way. ... I do have a split db with a hidden form that opens when the database does to ... Private Sub Form_Unload ...
    (microsoft.public.access.formscoding)