Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    85

    Unanswered: Quick help Required please

    when adding values. using a formula in the control Source
    i.e =[ FEE]+([TD]+[TT]+[EXTRAS])

    instead of getting FEETDTTEXTRAS its adding as a string.. I want the Total....

  2. #2
    Join Date
    Jun 2004
    Posts
    7
    Are these field names for numeric values that you want to add. If so, try this in the control source:

    =Sum([fee]+[td]+[tt]+[extras])

    Rory
    Last edited by RoryM; 11-26-04 at 03:58.

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Although VB is quite good at anticipating variable conversions it can be smarter to explcitly defien the data type you want
    eg
    =cint([ FEE])+cint([TD])+cint([TT])+cint([EXTRAS])
    if you are using integers
    use
    csng for single precision
    cdbl for double precision
    etc......
    suspect in your case it would be best to use csng, you can mix and match
    eg cost=ccur((cint(qty)*ccur(price))/csng(discount))

    the sum would work, i think if you were using in a report or form group footer where you wanted the sum of the values in the group.

Posting Permissions

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