EOF BOF frustration

  • Thread starter Thread starter quixote
  • Start date Start date
Q

quixote

How do I keep the Next Record button from acting as a New
Record button as well? I put in some eof/bof code but it
is not being recognized. When I am at the last record I
need to throw a message stating it is the last record and
then exit the sub routine.

Thanks
 
You have to read forward 1 record to determine it is eof or not. If it is,
enable your next button, otherwise disable your button. Eof is true when
record pointer is ** beyond ** the last record.

HTH,
Suntisuk
 
quixote said:
How do I keep the Next Record button from acting as a New
Record button as well? I put in some eof/bof code but it
is not being recognized. When I am at the last record I
need to throw a message stating it is the last record and
then exit the sub routine.


You can set the form's AllowAdditions property to No to
prevent new records from being created.

If you want more detailed control, you'll have to construct
your own navigation buttons. There's samples in the Access
xx Developer's Handbook or you can google for previous
postings on this subject.
 
If your OnCurrent event add code to a RecordSetClone. I
don't recall if the bookmark for recordset will be the
same for the form recordsource automatically; you may have
to set that. The just do a MoveNext on the RecordSetClone
and test the result.

Good Luck!
 
Back
Top