Results 1 to 6 of 6

Thread: MS Access VBA Cycle through records

  1. #1
    Join Date
    Oct 2003
    Location
    california
    Posts
    3

    MS Access VBA Cycle through records

    I'm trying to cycle through all records in a Access database. I want to find a value of a field in a column. Based on that value I need to update another field. I've been trying to get a FOR loop to go through each recordset, but I’m having no luck.

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Try to avoid looping. Looping is too expensive.

    looping example:

    http://users.bigpond.net.au/abrowne1/ser-29.html

    http://www.experts-exchange.com/Data..._20641510.html

    BTW. Why cant you use "update" statement with different conditions.

  3. #3
    Join Date
    Oct 2003
    Posts
    8
    Vir:
    Why don't you use an "Update query"

    UPDATE "Table_Name"
    Set"Colum_1"=[New Colum]
    WHERE{conditions}

  4. #4
    Join Date
    Oct 2003
    Posts
    8
    Vir:
    Why don't you use an "Update query"

    UPDATE "Table_Name"
    Set"Colum_1"=[New Colum]
    WHERE{conditions}

  5. #5
    Join Date
    Oct 2003
    Location
    california
    Posts
    3

    Why didnt i think of that.

    Thanks for the help the update query worked great.

  6. #6
    Join Date
    Oct 2003
    Posts
    8

    Wink

    Viradis:

    Your welcome..Anytime.Anymore problems, I will be glad to help...

Posting Permissions

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