Before Update Event - not saving record, etc.

CedarTree

Registered User.
Local time
Today, 13:08
Joined
Mar 2, 2018
Messages
456
I have a few subforms on a main form and when a record is changed, I use before/after update events to write data to a SQL server. It normally works perfectly fine. I can edit a row in a subform, click to the next row, and the data gets written. But if I edit a cell and then click on ANOTHER subform, I get "the on before event warning / can't update the record..." (Something like that). But it works anyway. Anyone have an easy way to suppress the pop-up?
 
Hi. I imagine the popups are trying to tell you something. I wouldn't ignore them; rather, maybe try to figure out why they are happening and then try to fix the reason.
 
if you are using Bound form, there is No Need for you to issue "SQL update" query.
it will cause conflict. the form will "send" the update, while you also "send" the update.
 
Not using a bound form connected to the data I am updating. The subform looks at a temporary local table that mirrors the data I update via SQL. So it's client/server set up.
 
Even if it's a local table copy, it still means that the data in the table is trying to be written to somewhere else or that record is locked.
So you should still be trying to understand what is causing it.

I would possibly write the Remote SQL table changes on the main form exit/close rather than sub-form exit if they are bound.
 

Users who are viewing this thread

Back
Top Bottom