Results 1 to 10 of 10
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updating with ADODB.Recordset

    Dear all,

    I have a problem!

    I would appreciate any comments or advice!!!

    The following code updates the Boolean field

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating with ADODB.Recordset

    Rupert:

    No handy reference immediately available to address where the EOF is, but can you print an identifying field to the immediate window for the record Access considers to be the records at the EOF?
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating with ADODB.Recordset

    Good tip! I'll give it a try!

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Updating with ADODB.Recordset

    Have you tried using a counter in a For Next loop instead? That will execute once for every item. Or switch your Do Until loop to a Loop Until, so that the condition is evaluated at the end of the loop instead of at the beginning.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating with ADODB.Recordset

    Quoting from <A target="_blank" HREF=http://www.wrox.com/Books/Book_Details.asp?sub_section=1&isbn=1861001762&sub ject=Access&subject_id=14>Beginning Access 2000 VBA</A>, "...the EOF property is True if the current record pointer is placed immediately after the last record.".

    Based on that definition, I'm not sure that I see the problem with your code; have you been able to resolve the issue w/ Charlotte's advice?
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating with ADODB.Recordset

    I think I

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Updating with ADODB.Recordset

    Rupert,

    I'm a little confused by what you have open and what you have closed. Why would you have the TABLE open when you were running this code?

    If any of the records in the table is in an edit mode, I'm not surprised it didn't get updated. Even if you have No Locks set, that doesn't mean two "users" can actually edit the record at the same time ( or that you can edit it from two places at once).

    Normally, unless you use a transaction, a lock is placed on a record as soon as it goes into edit mode. That's one of the purposes of transactions, in fact, to keep from locking the records until you're ready to do the update.
    Charlotte

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating with ADODB.Recordset

    My problem is this.

    I have a continuous form open. It has a check box called

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Updating with ADODB.Recordset

    OK, it just wasn't clear what was going on. The simplest thing might be to just force a save on the current record. You could stick a DoCmd.RunCommand acCmdSaveRecord into your code and see what effect that has.
    Charlotte

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating with ADODB.Recordset

    Thanks Charlotte, that did the trick! It fixed the query too!

    And thanks to Shane as well.

Posting Permissions

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