Results 1 to 3 of 3

Thread: Formating Dbgrid?

  1. #1

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179

    Question

    Hi
    My question are:
    1)How can i format the dbgrid so that it can accept floating point numbers instead of round numbers?

    2)I am currently doing a project that require the use of cents, how do i convert a number like 14.5 in a textbox to 14.50??


    Any suggestion or help will be greatly apreciated

  2. #2
    Member
    Join Date
    May 2000
    Posts
    41
    not sure about question 1 since i use the flexgrid but #2 is easty:

    use the Format command -

    ' User-defined formats.
    MyStr = Format(5459.4, "##,##0.00") ' Returns "5,459.40".
    MyStr = Format(334.9, "###0.00") ' Returns "334.90".
    MyStr = Format(5, "0.00%") ' Returns "500.00%".

    MyStr = Format("HELLO", "<") ' Returns "hello".
    MyStr = Format("This is it", ">") ' Returns "THIS IS IT".
    Here I doeh again

  3. #3

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    Hi Draez68
    I tried your suggestion for question 2 and it really works
    Thanks a lot

    About question1 can you post on how to format a flexgrid, my guess is the way you frormat a dbgrid is the same as flexgrid

    thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width