Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    15

    Unanswered: textbox calulation error

    Hi,

    i am getting strange error. wondering, if someone knows, wht's wrong

    A: i have set up five textboxs to get value from query, using dlookup.

    Text83.Value = DLookup("[ytd actual]", stbudget, "[Account Descriptions]=" & "'TRAINING'")

    If IsNull(Text83.Value) Then
    Text83.Value = "$0.00"
    End If

    the sixth box, it sums up all the values from fivebox above. however, i am getting an error about type mismatch, and then i get value in 6 the box as $0.00$0.00$0.00$0.00$0.00. does anyone know, why i am getting this.

    thx

    nix

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You are attempting to sum strings.

    Two things, use the nz() function, and use a display format (Currency) instead of adding it by hand.

    Text83 = nz(DLookup("[ytd actual]", stbudget, "[Account Descriptions] LIKE 'TRAINING'"), 0)

  3. #3
    Join Date
    Apr 2004
    Posts
    15
    thanks teddy,

    it worked. woo hoo
    nix

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Good to hear, at least I got COUPLE right today.

    *sigh*

    TGIF

Posting Permissions

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