According to Help:
"Note: Changing the RecordsetType property of an open form or report
causes an automatic recreation of the recordset."
This sets the CurrentRecord back to 1 and reinitiates the Form Current
event, which loops again, causing an endless loop.

Signature
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
> Hello,
>
[quoted text clipped - 17 lines]
>
> Daniel
> Hello,
>
[quoted text clipped - 13 lines]
> execution. Could someone explain why what I thought was a simple IF
> statement make the db loop like that? Also, is there a work around?
Roger explained what's going on. For a workaround, what are you trying
to achieve, in a practical sense? If you just want to make the form
read-only, you can do it by setting its AllowEdits, AllowAdditions, and
AllowDeletions properties to False.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Daniel - 17 Nov 2006 02:41 GMT
First off, Thank you Roger for the explanation!
Dirk, I have been asked to lock previous record but leave the most recent
open for editing. Thus record 1 should be dynaset and any other snapshot (in
my mind at least...). I did try the allowedits but it still permited my
users to make entries because they could still activate the double-click
event which opens a calendar and programatically made changes. Any
suggestions?
Thank you both once again.
Daniel
> > Hello,
> >
[quoted text clipped - 18 lines]
> read-only, you can do it by setting its AllowEdits, AllowAdditions, and
> AllowDeletions properties to False.
Dirk Goldgar - 17 Nov 2006 04:52 GMT
> First off, Thank you Roger for the explanation!
>
[quoted text clipped - 4 lines]
> still activate the double-click event which opens a calendar and
> programatically made changes. Any suggestions?
I'm not sure what you mean by "most recent" -- whether you just want to
let users add records but not edit records that have previously been
saved, or whether you have something more complicated in mind -- but I
stil think your best bet is to manipulate the form's AllowEdits and
AllowDeletions properties. If you have an event procedure that modifies
a record using code, surely you can test in that procedure whether the
modification should be allowed or not, and simply refuse to do it.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)