Odd behaviour

Niniel

Registered User.
Local time
Today, 15:47
Joined
Sep 28, 2006
Messages
191
Hello,

Something weird happened to me - I have a form with continuous subforms and on it are checkboxes. When I click on one specific checkbox, a text box on the parent form becomes visible, where I can add text, which is added directly to the table in the AfterUpdate event.
However, the query underlying the subform does not reflect the change, and when I either go to a different record on the parent form, or click on another checkbox in the subform, I get an error message:

"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. [...]"

I can then Save The Record, Copy To Clipboard or Drop Changes.

When I drop changes, the text shows up in the query, although my textbox disappears.

The one time I selected Save, however, the table got messed up and a foreign key was replaced by what looks like random number [used to be "1", is now "4587525"]. A second foreign key was also changed.

Can anybody explain this?
And, more importantly, suggest a way to avoid this entire situation?

Thank you.
 
Last edited:
Never mind, I figured it out.
The problem was caused by me trying to do this with more than one textbox; looks like attempting to directly update the table from more than one textbox at a time is a bad idea and leads to conflict.
Now I'm updating the queries my subforms are based on, and that seems to have taken care of it.
 

Users who are viewing this thread

Back
Top Bottom