EOF BOF frustration

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
 
A

Albert

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
 
M

Marshall Barton

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.
 
R

Randy

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top