Skip to Content
author's profile photo Former Member
Former Member

formart decimal

Set oItem = oForm.Items.Add("ETotal", it_EDIT)

Set oEdit = oItem.Specific

oEdit.DataBind.SetBound True, "", "txtTotal"

oItem.Top = 250

oItem.Left = 485

oItem.Width = 75

oItem.Height = 15

oItem.Enabled = False

oEdit.Value = frm2.Items.item("123").Specific.Value

my edit.value is "27.45" can i convert it to show as "27,45""

ther is a way to creat a format in the edit(0,000) i dont know?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 12:11 PM

    Miguel,

    Have you try:

    oEdit.Value = Replace(frm2.Items.Item("123").Specific.Value, ".", ",")

    Or use the Format intrinsic fuction

    The above only changes the look on surface. Saving into DB is another story which, I guess the guys have explained.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 04:33 AM

    Hi

    I believe that the frm2.Items.item("123").Specific.Value is dependant of the regional settings in the machine.

    Maybe you can build your own format function. With yopur formar function you can forget about the regional settings in the different user workstations.

    Harold

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Harold is right ...

      All you need is your own function to do the formating.

      get the "local" decimal sepparator, according to the local regional settings ... we usually use the following

      Dim dNumber As Double

      Dim sDecSep As String

      dNumber = 1.1

      sDecSep = Mid(CStr(dNumber), 2, 1)

      set any number to 1.1 ... and then get the 2nd char from there, which is decimal separator

      and you have local decimal separator.

      Now get the SBO decimal separator from the settings ... table OADM, column DecSep

      and now ... change the "local" separator to the separator which requires SBO...

      PS: don't forget that the SQL is usually set to use the local decimal separator, not the one in SBO, so you might have problems when inserting strings from SBO to SQL as numbers ...

      Jaro

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.