Results 1 to 3 of 3
  • Thread Tools
  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. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. 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

  4. 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
  •