Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form has been changed since the last time you opened it, either by ...

Status
Not open for further replies.

ruthcali

Programmer
Apr 27, 2000
470
US
I am using Access97 in a Novell environment.<br><br>Help. Users keep getting this message:<br><br>&quot;[Formname] has been changed since the last time you opened it, either by another user or because another instance of it was opened on your machine.<br>Do you want to replace the changes that you or another user made?<br>-To save your most recent changes and discard the other user's changes or your previous changes, click yes.<br>-To save this version of the object with another name, click no.&quot;<br><br>When the form opens, i have an autoexec macro that calls a function which calls a sub which has the following code: <br><br>Application.SetOption &quot;Default Record Locking&quot;, 2<br><br>That way i ensure that all users opening the database have the same settings. (right?).<br><br>so if the record locking is set to pessimistic, why do we keep getting that message box?<br><br>There are about 20 people who will use this database. how can i make it so this doesn't keep happening.<br><br>i have read other threads dealing with this, and they say to delete the .ldb file. But, doesn't that file appear everytime the database is opened?&nbsp;&nbsp;<br><br>Also, someone mentioned making a MDE file. i am a bit confused about that. <br><br>i make a MDE file and tell the users to change their shortcuts so everyone is filling their info to that database. But, if i must add a field to a form, or create a new label, etc., i must do it in my original mdb database. But, then i will lose all the updates the users have been entering in the MDE file!&nbsp;&nbsp;it seems logical that i would take the MDE file, convert it into a MDB file, make my changes, then convert it back to the MDE file.&nbsp;&nbsp;but, from what i have been reading, to make changes to the MDE file, you must just open the original MDB file and then convert it. <br><br>i am a bit confused and desperate about that message above. please, can someone enlighten me.
 
There was a post like this one recently, and what you might want to try is, just before executing your macro run this line of code:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;DoCmd.RunCommand acCmdSaveRecord<br><br>&nbsp;&nbsp;&nbsp;&nbsp;It's worked for me in that situation before.&nbsp;&nbsp;Much thanks again to 3rdRail for showing me the light! =D <p>xtreme1<br><a href=mailto:rbio@excite.com>rbio@excite.com</a><br><a href= > </a><br>
 
hi,<br><br>it doesn't work. this is getting serious. i have 20 users all entering info. and changes keep getting overwritten!!<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Are other users actually editing the records to cause this error?&nbsp;&nbsp;Or is this caused by something your code changes?&nbsp;&nbsp;If it's because of the first reason you could always do something along the lines of adding another field to one of your tables that is boolean, and keeps track of whether or not the record is in use.&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then you could just have the form check on load(where you put the check really depends on your setup) for whether or not that value is, say, &quot;TRUE&quot; for in use.&nbsp;&nbsp;If the value is true, you could either popup a little warning message box, or just refuse to take any further action and close the form.&nbsp;&nbsp;Hopefully this helps you to sort out your problem, or at least gives you ideas on where you can go from here.&nbsp;&nbsp;Good luck. =] <p>xtreme1<br><a href=mailto:rbio@excite.com>rbio@excite.com</a><br><a href= > </a><br>
 
RE: <br><font color=red><br>Application.SetOption &quot;Default Record Locking&quot;, 2<br><br>That way i ensure that all users opening the database have the same settings. (right?).<br></font><br><br>Setting the &quot;Default Record Locking&quot; only sets the form &quot;Record Locks&quot; property, as each form <b>is initially created</b>.&nbsp;&nbsp;This setting is used by the people developing the application.&nbsp;&nbsp;It has no use for those who are running your application.&nbsp;&nbsp;While it appears that the value you've choosen appears to be the correct one (2 = &quot;Edited Record&quot;), you still need to make sure that all of the forms have the &quot;Record Locks&quot; property set correctly.<br><br>You get the message you show above when the &quot;Record Locks&quot; has been set to &quot;0 - No Locks&quot; (which is the default unless you change it using the Tools/Options from the Access menubar). <br><br>The bottom line -- Check each of your forms and change the &quot;Record Locks&quot; property of the form to &quot;Edited Record&quot;.<br><br><font color=red><b>Caution</b></font> -- Test your application carefully after changing the &quot;Record Locks&quot; property!&nbsp;&nbsp;You may find that some complex forms no longer allow ANY data to be changed!&nbsp;&nbsp;This is due to the nature of the lock.&nbsp;&nbsp;As soon as user 1 starts to make changes to a row, that row (and ALL the other rows in the same 2k &quot;page&quot;) are locked until the 1st user saves her changes.&nbsp;&nbsp;You may need to think through how your application works (or how you want it to work).&nbsp;&nbsp;Someone who starts to make a change and then gets distracted by a phone call (or goes to lunch) can tie up the database table for a long time.&nbsp;&nbsp;<br> <p>Jim Conrad<br><a href=mailto:jconrad3@visteon.com>jconrad3@visteon.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top