Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using Unbound combobox columns for calculation (XP)

    I have a number of multicolumn combo boxes. I wish to add (sum) the value (dollar amount) from the second column (unbound) from each combo box and display in an unbound field all on the same form.

    I used: =combobox1.column(1) + combobox2.column(1). However, the values are concatenated instead of being added, although they will multi[ply if * is used instead of +.

    What have I missed?

  2. #2
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Unbound combobox columns for calculation (XP)

    Hi

    While I don't profess to be an expert on this I think you need to explicitly state the combo values are numbers. If Access considers them to be strings then + symbol can be confused with concating. So I would amend it to read:

    clng(combobox1.column(1)) + clng(combobox2.column(1))

    Regards
    WTH

  3. #3
    New Lounger
    Join Date
    Jan 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Unbound combobox columns for calculation (XP)

    Thankyou Thankyou Thankyou WTH, it worked. I had spent two days searching the help files and web for a solution.

Posting Permissions

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