Putting a GoToRecord command in the OnCurrent event's code means that you
keep calling that code recursively before it's done. You need to separate
the movement to the next record to code that is not in the OnCurrent event's
code.
--
Ken Snell
<MS ACCESS MVP>
"Frank Wagner" <(E-Mail Removed)> wrote in message
news:0a8601c35694$3ffab790$(E-Mail Removed)...
> I am haveing trouble with error message #2105 "You can't
> go to the specified record"
>
> My goal is to be able to open the form, have it move to
> the first record with a selected condition, and stop at
> that record so it may be worked on,. Then when the "next
> record arrow" at the bottom of the form is clicked,
> proceed to the next record that has that condition and
> stop again.
>
> I've placed the code "DoCmd.GoToRecord , , acNext" in a
> Form-Current Private Sub, so that it operates when the
> condition is met.
>
> It seems to proceed to the first record alright, but then
> when I ask it to proceed to the next record it gets hung
> up with error number 2105 "You can't go top the specified
> record". If I change the condition so that it takes
> effect on an earlier record in the table, it just gets
> hung up the same way on an earlier record.
>
> Any help would be appreciated.
>
> Thanks
>
> Frank Wagner
>
>
|