I’ve run across a problem that, after 15 years of Access development, has me stumped. Here’s the situation:
In an OpenForm command, I’m passing the primary key value of the record I want to locate when the form is opened. In the Form_Load I call a subroutine in the form’s code that locates the desired record using RecordsetClone and FindFirst. If the record is found, I set the form’s bookmark to the RecordsetClone bookmark. All of that works just fine. The problem arises when I make a change to the data and close the form. The changes are not saved.
If I use the RecordsetClone and loop through the table to find the desired record, the changes are saved when the form is closed. The problem with doing this is that the search time is prohibitively long.
I’ve used the FindFirst method in many other applications and even elsewhere in this application without any problems. Has anyone encountered this and have you come up with a solution.
The applications uses Access 2007 linked through ODBC to Sql Server 2008 R2 database.