Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    15

    Unanswered: Acess is adding numbers as strings - help

    I have a SQL view taking a column of numbers from one table and dividing by 2.2046, and another view that's doing the same on another table.
    When I feed these views through into Access and have a form that displays the values, and a text box which sums them, the text box is treating them as strings.
    eg if the first total is 100 and the second total is 50 instead of showing the result as 150 it shows it as 10050.
    I have tried converting at the SQL end to decimal and int, converting via a query at Access end using CInt, and still Access will not add them together as numbers.
    Can anyone shed some light here?
    thanks

  2. #2
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188

    Re: Acess is adding numbers as strings - help

    Originally posted by BigMrC
    I have a SQL view taking a column of numbers from one table and dividing by 2.2046, and another view that's doing the same on another table.
    When I feed these views through into Access and have a form that displays the values, and a text box which sums them, the text box is treating them as strings.
    eg if the first total is 100 and the second total is 50 instead of showing the result as 150 it shows it as 10050.
    I have tried converting at the SQL end to decimal and int, converting via a query at Access end using CInt, and still Access will not add them together as numbers.
    Can anyone shed some light here?
    thanks
    provided that we have textbox1 contains 100, and textbox2 contains 50 as text, textbox3 should contains: =val([textbox1]) + val([textbox2]) textbox3 will display 150
    qha_vn

Posting Permissions

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