How do I update a table without closing a form?

Posted on 2010-01-05
Last Modified: 2013-12-20
The following sequence of events takes place:

1 - I open  fm_Example open, with controls bound to tbTable
2 - I make changes to bound controls on the form
3 - While the form is still open, I open rs_Records also from the tbTable that the form is bound to
4 - I make changes, .update, and .close rs_Records
5 - I close fm_Example

I get this message with the indicated options:
"Write Conflict
This record has been changed by another user since you started editing it.  If you save the record, you will overwrite the changes the other user made.
Copying the changes to the clipboard will let you look at the values the other user entered, and then paste your changes back in if you decide to make changes." with the following option buttons:

Save Record         Copy to Clipboard         Drop Changes

The changes I made on the form must be conflicting with the changes in the recordset.
I assume I need to update the table from the form before opening the recordset,
How do I UPDATE THE TABLE FROM THE FORM while it's still open without moving off the current record?

Question by:DaveRoehrman
    LVL 119

    Accepted Solution

    before opening the recordset, place this line


    Author Closing Comment

    Just what the doctor ordered!  Many thanks.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Join & Write a Comment

    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now