Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Exclamation Unanswered: recordset RE-creation problem

    Hi there
    I have a recordset that is set inside a loop.
    I want to do this because i am deleting lines as i go along.
    each time i delete a line, i want the recordset to be reset.

    Is there a reset command?
    or
    how do i set it up so that it doesn't crash from being set too many times?

    thanks in advance
    ActionAnt

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What do you mean "reset"?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    at the beginning of the loop i go..
    set rs = currentdb.open.........
    I have 65000 records, so rs is set a lot of times and then it always crashes.

    how can i still set rs so many times without it crashing?

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    wha...

    why are you opening it at each iteration of the loop?

    Is there a reason you're not opening the recordset, THEN executing your loop?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    yes,
    when it deletes a record it doesn't refresh itself so i get an error saying that "record can't be found because it is deleted"
    if i use rs.movenext, then it tends to skip over files and i have to run the code mutliple times make sure that all the records at covered

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    So manually refresh the recordset using the "refresh" method?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  7. #7
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    you mean rs.refresh?
    not available

  8. #8
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    I tried re.requery, but also doesn't work

  9. #9
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Question

    Quote Originally Posted by actionant
    I tried re.requery, but also doesn't work
    Hm. Was just going to suggest trying that one. (Haven't used it myself.)

    Anybody knows what the rs.requery is useful for, if not in this very situation?

    Daniel
    Win-XP pro, Access 2002, ADO 2.7, DAO 3.6. English versions of apps/OS.

Posting Permissions

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