Blank Record at the end of the file? 
Author Message
 Blank Record at the end of the file?


>called 'Previous Record' and 'Next Record' to instead of it. I wrote
>these codes:

>    if not data1.recordset.eof then data1.recordset.movenext

>for the 'Next Record' button, and,

>    if not data1.recordset.bof then data1.recordset.moveprevious

>but the problem is, when I use these two buttons and reach the
>beginning of the database file, there seems a blank record. Do you

Philip, when you say "seems a blank record", I take it that there isn't
actually a blank record. What you are doing is moving to EOF and BOF.
Unless you have a pressing reason for wanting to be sitting on EOF or BOF,
I think the following might work better.

if data1.recordset.eof then
end if
if data1.recordset.bof then
end if

This way you never move past the last record or prior to the first one (or
at least you don't appear to).

Probably it is also a good idea to precede both of these with a test for
an empty file. - ie -

if not (data1.recordset.eof and data1.recordset.bof)
        make your move
end if

Take care


Sun, 05 Apr 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. .AddNew not adding blank record points to existing record

2. Import File - No End of Record

3. Reading text file with only LINE FEED characters at end of each record

4. eliminate blank page at end of reports?

5. Problem with sentence selection, testing for blank lines, and end of document code

6. Printing blank page at end of report

7. Printing blank pages at the end of the report

8. Blank page at the of end of report

9. Blank page at report end

10. How to get to the end of the file if there is a lot of blank space at the end

11. Remove Blank Records

12. Link Table - blank records


Powered by phpBB® Forum Software