>Greetings All,
>
>does anyone know of a good place to find a working navigation class? I can move my records but when at EOF or BOF, my Next, Prev buttons aren't enabling / disabling properly.
>
>Here is the code that I am using so far:
>
>Next Button Click
>IF !EOF()
> SKIP 1
> oVar.EmployeeId = pk_emp_id
>ENDIF
>
>IF EOF()
> GO BOTTOM
> skip 1
>ENDIF
I usually have the code of enabling/disabling nav buttons in Refresh method of the form. Something like this:
thisform.cmdNext.enable = .f.
thisform.cmdPrev.enable = .f.
if !eof()
nRec = recno('alias_name')
skip
if !eof()
thisform.cmdNext.enable = .T.
endif
goto nRec in ALIAS_NAME
endif
if !bof()
nRec = recno('alias_name')
skip -1
if !bof()
thisform.cmdPrev.enable = .T.
endif
goto nRec in ALIAS_NAME
endif
HTH
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham