Access has to save the record before it can move to another one. Try
explicitly saving before the other code, e.g.:
If Me.Dirty Then Me.Dirty = False
My guess is that this will fail (saying the property can't be set), which
indicates that the current record cannot be saved. You must fix the problem
before you can move on.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I am trying to move between records with the following code (in the AFTERT
> Update event of a listbox):
[quoted text clipped - 19 lines]
>
> Thanks.
Martin Folley - 04 Sep 2007 13:06 GMT
Thanks for the reply, school hols are now over and it is back to work :-(
the immediate window reports me.dirty as already being false, which kind of
implies that no data has changed (which matches the reality as I see it).
The error message actually says ...
'The macro or function set to the BeforeUpdate or ValidationRule property
for this field is preventing Microsoft Office Access from saving the data in
the field'.
The error occurs when I am setting Me.Bookmark. Me.Name gives the name of
the form itself rather than a field. Is there a way to determine which
'field' the error message applies to?
> Access has to save the record before it can move to another one. Try
> explicitly saving before the other code, e.g.:
[quoted text clipped - 27 lines]
> >
> > Thanks.
Martin Folley - 18 Sep 2007 12:26 GMT
I never managed to solve this one but compromised on how the form works.
It seems that I can use a click event on one unbound list box to change and
select different options in other unbound list boxes in a sort of cascade of
options, but that I cannot then move the underlying record based on these
changes. The final list box in the series must be clicked to move records, I
cannot do it via vba, even if no bound data has been changed at any point.
> Thanks for the reply, school hols are now over and it is back to work :-(
>
[quoted text clipped - 41 lines]
> > >
> > > Thanks.