Saving always claims someone else edited the record?

G

Guest

I've made a number of minor changes to a form, and now when I attempt to hit
my Save button, it always says...

This record has been changed by another user since you started editing it.
Blah blah blah.

But that's simply not true. The only edits made are my own, in fact, there's
no one else connected to the database in question. So then, what's wrong with
this code...

Private Sub SaveButton_Click()
If Me.Dirty = True Then Me.Dirty = False
DoCmd.Close
End Sub

It breaks on Me.Dirty = False. I don't see the problem, do you?

Maury
 
A

Allen Browne

Hi Maury

Unless there is some other process that has changed records as well, the
symptom you describe can indicate a corruption of the form. A decompile
might rescue it.

Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

Then compact the database:
Tools | Database Utilities | Compact

For tips on avoiding the problem, see:
Preventing Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-25.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:D[email protected]...
 
G

Guest

Allen Browne said:
Unless there is some other process that has changed records as well, the
symptom you describe can indicate a corruption of the form. A decompile
might rescue it.

Actually I found the problem just before I left last night.

Get this, if you use a bit type in SQL Server, it maps into a Yes/No in a
linked table. That's basically what I'd expect. However there appears to be
some sort of a type mismatch, because as soon as you add this field to the
table and update the table in the link manager, the app starts causing this
error.

I can't find this documented anywhere, but that's likely due to MS's search
engine. Frankly, this astounds me.

Maury
 
A

Allen Browne

Thanks for posting the solution.
It looks like this article:
http://support.microsoft.com/?id=280730

It helps if you can specify the tables are from SQL Server.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top