Results 1 to 3 of 3

Thread: What's wrong with this?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2004
    Posts
    344

    What's wrong with this?

    Im trying to add the value in the database so the value will keep accumulating instead of just updating.

    VB Code:
    1. rs(1) = amt
    2. rs(9) = amt + rs(9).value

    Whenever I key in a value(amt), it will be store in rs(1) in the database, so now I wants to created a new column "rs(9)" for the accumulating value. Whats wrong with this code or is there anyway I can do? Please advice...

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: What's wrong with this?

    use the value property

    VB Code:
    1. rs(9).Value = 'your new value
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: What's wrong with this?

    by the way, what field is rs(9) in your query or recordset?
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

Posting Permissions

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



Click Here to Expand Forum to Full Width