• Updating with ADODB.Recordset

    Author
    Topic
    #356736

    Dear all,

    I have a problem!

    I would appreciate any comments or advice!!!

    The following code updates the Boolean field

    Viewing 1 reply thread
    Author
    Replies
    • #528511

      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?

      • #528517

        Good tip! I’ll give it a try!

      • #528568

        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.

    • #528680

      Quoting from Beginning Access 2000 VBA, “…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?

      • #528887

        I think I

        • #528906

          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.

          • #528930

            My problem is this.

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

            • #528945

              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.

            • #528955

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

              And thanks to Shane as well.

    Viewing 1 reply thread
    Reply To: Updating with ADODB.Recordset

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: