Re: Toolbar

From: Gerben Kessen (gerben.kessen(_at_)wantit.nl)
Date: 08/06/04


Date: Fri, 6 Aug 2004 17:18:21 +0200

Cowboy,

There is no FIRSTREC() and LASTREC() function, of course you can make them
yourself but you have to leave the record to determine the last and first
record.
- When there is no filter and no index you can use the reccount() function
the determine the last record
- or you can make two variables with the first and last record numbers, but
you have to update them with every new record etc...

IMO, the best way is to move the recordpointer and test on eof()....

IF EOF()
    llLast = .t.
ELSE
    SKIP 1
    IF EOF()
       llLast = .t.
    ENDIF
    SKIP -1
ENDIF

IF llLast
    MESSAGEBOX("this is the last record")
ENDIF

Gerben Kessen

"Cowboy" <Cowboy@discussions.microsoft.com> wrote in message
news:C76E5DB6-DEB7-4EDC-8523-9023352CA04F@microsoft.com...
> I have added a table navigational tool to a form. (My first experience at
> this). Is there an easier way to determine the first and last record of
the
> table other than go top and go bottom. I dislike leaving the current
record
> to determine those records. I want them to inform the user he is at the
top
> or bottom of the table rather than wait for a bof() or eof(), etc.
>
> TIA



Relevant Pages

  • Re: Data order on response form
    ... The addition to the bottom of the messages has nothing to do with the sender of the email ... - it is added by his anti-virus software on receipt of the email ... plus additional data about the virus protection program, ... | "eofeofeof" so my import program can ignore everything after the 'EOF' ...
    (microsoft.public.frontpage.programming)
  • Re: recno() and "Record is out of range"
    ... recdno, if EOF encountered, then goto the top or bottom. ... on the new filter or an SQL Order By clause or Set Order To. ...
    (microsoft.public.fox.vfp.forms)
  • Re: write error
    ... Bill Cunningham said: ... The text is in between the bottom of the first page and top of ... Do not confuse the concept of an EOF ... Richard Heathfield ...
    (comp.lang.c)
  • Re: A function returning string or pointer
    ... having the test for EOF and NL at the bottom is wasteful as the code ... within the DO clause has to do the test anyway. ...
    (comp.lang.c)
  • Re: cannot understand the character handling Program
    ... Language" by Dennis Ritchie, I tried to run the following program. ... not able to reach the EOF as specified in the While statement ... It is of type int, which allows it to take on values outside the range of char, such as EOF. ... "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. ...
    (comp.lang.c)

Loading