Results 1 to 2 of 2

Thread: Updatefields in once

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5

    Exclamation

    I want to replace my balance available fields on every employee at the end of every month with the field total allowance.please help me
    i'm using Access and ado.
    my table name coupon deduction and with fields
    employee id, total allowance, balance available, total use

    from hwa kern

  2. #2
    Member
    Join Date
    Nov 2000
    Location
    Manila, Philippines
    Posts
    51

    use the UPDATE SQL Statement.

    Im assuming you know how to connect ADO to an ODBC data source with a datasource name of 'Sample'.


    Dim dbConn as New AdoDB.Connection

    dbConn.Open "Data Source=Sample"

    dbConn.Execute "UPDATE Employees SET Allowance=50"

    =================
    if a condition is present;
    dbConn.Execute "UPDATE Employees SET Allowance=50 WHERE ID='dirtbag'"

    =================
    There yah go... that should do the trick. Pretty easy isnt it??

    Jonn
    Programmers dont byte, they just nibble a bit.

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