Supress warning "This record has been changed by another user..."

buratti

Registered User.
Local time
Today, 04:12
Joined
Jul 8, 2009
Messages
234
Upon close of my form I am gettign this error "This record has been changed by another user since you started editing it..." Now I know why I am getting it, but cant figure out a way around not receiving this message. Let me explain...

I am using the QuickBooks SDK to connect my Access db to my Quickbooks file. I open my form and enter new data. In the save and close button I run several procedures that update this "new" information into Quickbooks. In a short explination, after the Quickbooks update, quickbooks sends back information to Access. One bit of this information is an edit sequence number for the customer updated/added in Quickbooks. This number is essential to me if I ever need to update or edit this same customer again, so I then run an update query in Acess to update the table with this new edit sequence number. All these updates and procedures are preformed on the same button click and ALL before the close event. The problem is that the table being updated is the same table my form is based on, so access is seeing that the record has changed since I opened it, hence throwing this error/question dialog.

Ok, that was a mouth full and if you are still with me is there any way to tell access to just ignore this question. There is really no way (at lease no easy way) around NOT updating the same table my form is based on BEFORE closing my form. Any suggestions??? More info can be provided if I was unclear or too confusing.
 
Why would you not just update it from the form instead of running the update query? If you are on the applicable record, just update it there in the code. Then your problem is solved.
 
Or create the form as unbound form.
but this will put you at the risk that someone else might edit the same record at the same time you do.
 
Why would you not just update it from the form instead of running the update query? If you are on the applicable record, just update it there in the code. Then your problem is solved.
Thanks, and although this sounds like it would be just the simplist thing to do, it is not really possible, at least no easy way of making it possible without restructuring all my code, and then having to restructure all my other forms that use the same code.

You see the form I am having a problem with is basically a customer info update form. I open the form which is based on the customers table. I do my updates which change the data directly in the table. When I click "Save" I run a public function in a seperate modual which takes that updated data (sent to it on form of a recordset) and sends it to Quickbooks to update the customer there with the same data. This function is in a seperate modual because several other forms run the same function. Quickbooks then returns a response message set that I then send to another function that interpertes the response and extracts certain data. This function then takes the extracted data and updates the customer table via query. This data is kind of "behind the scenes" data that I cannot manually enter myself. This step is where the problem occurs since technically the form is still open during this update query.

Like I said, I can restructure the function(s) to send the response from Quickbooks back to the forms modual and update the table there, eliminating the update query and the problem, but then I would have to change all of the other forms that use the same function (which all of them work perfectly fine). This would create multiple copies of the same lines of code, which essentially defetas some of the purpose of a public finction, would it not?

It is not that big of a deal. I'm sure I can figure something out where I can simulate keystrokes to keep the changes or something, but the point of this question was to see if i can tell Access to temporarily ignore this issue or using save commands somewhere that would eliminate the issue.
 
Modify your function to send it the updated data back to the form and don't use the update query.

And don't use something to simulate keystrokes, that will come back to bite you.
 

Users who are viewing this thread

Back
Top Bottom