Warning msg --> The record has been changed by another user...

Hmmm, let's try this put one line and one line only on the button...

Code:
Me.MyField = "Whatever"

...what happens when you do that?
 
Ok I figured out a work around!!!

I noticed that every time I pressed the button the error window came up only if the field was already with the same text I was trying to assign. If I edited the field manually and changed records back and forth it worked perfect, but if I pressed the button again then the error window poped up again.

So I figured, lets check first if the string Im trying to assign is the same one as in the one contained in the field? and if it is, then do something else, or nothing.

I proved it this way:

Private Sub button2_Click()
If Me.myfield = "whatever" Then
Me.myfield = "other"
Else
Me.myfield = "whatever"
End If
Me.Refresh
End Sub

This way I can click as many times I want my little button and it just toggles the word "whatever" with "other" without any annoying popups :D Now I will just adjust this to the data I was intending to assign to the original field and I will be a happy person again :D

So, problem solved, thank you very much for your help, there´s no kiss this time :p but Im very grateful for your time ;)
 
Kudos to you! Heh, I'm just glad that's over!
 
Thank you for this thread. I've been having problems with my MySQL based access database for a long time. Isolating the fact that the problem is introduced if you set a data field equal to its original value is huge! Simple conditional statements before I change the value are preventing a lot of annoying "warning" messages.
 

Users who are viewing this thread

Back
Top Bottom