Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Recordset closing on Form_Unload (2003)

    How come, when I close the startup form of the attached mdb, code breaks at the line
    rst.Close
    for the Unload event of the form with Run-time error 3219 saying the operation is not allowed in the current context?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Recordset closing on Form_Unload (2003)

    You modify a field in the current record in the line

    rst.Fields("oref") = a

    but you don't update it. You must insert a line

    rst.Update

    immediately below it. The same goes for the line

    rst.Fields("oref") = b

    further down.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Recordset closing on Form_Unload (2003)

    Thank you Hans.

Posting Permissions

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