A small problem in your code is the following:
If you are at the first record, then you are the the Beginning Of File (BOF)
But if you are at the last record then you are not at the End Of File (EOF)
You are at the EOF when your record pointer is one position farther then the last record.
This is not true for the Begiining Of File.
you can have skip -1 at the first record, but you will stay at the first one.
For your EOF disabling you have to look at this.
The code could be something like this:
Local llEOF
if !EOF()
Skip
If !EOF()
Skip
If EOF()
llEOF = .t.
EndIf
Skip -1
Else
llEOF = .t.
EndIf
Else
llEOF = .t.
EndIf
>VFP 6.0
>
>Can you help me with this navigator issue. I have a Commandgroup of 10 buttons and the first 4 are the (|< < > >|). For some reason I keep getting confused with BOF(), weather it's 'Beginning Of File' or 'Bottom Of File'. I know the document and the indeed is the 'Beginning Of File', but still get the idea of 'Bottom', which is what the EOF() is. Anyway, can you kindly check the coding below and tell me what am I doing wrong for the navigation. Also, IF there is something I can use like This.Parent.Command1.DISABLED, how to do that (instead of using the '= .F.' and '= .T.')? As this UT allowed, I am using single quotes instead of double quotes in here.
>
>Thank you.
>
>Chuck
>
>
>( |< )
>GO TOP IN person
>This.Parent.Command1.ENABLED = .F.
>This.Parent.Command2.ENABLED = .F.
>This.Parent.Command3.ENABLED = .T.
>This.Parent.Command4.ENABLED = .T.
>ThisForm.REFRESH
>
>( < )
>IF NOT BOF('person')
> SKIP -1 IN person
>ENDIF
>IF NOT BOF('person')
> This.Parent.Command1.ENABLED = .T.
> This.Parent.Command2.ENABLED = .T.
> This.Parent.Command3.ENABLED = .T.
> This.Parent.Command4.ENABLED = .T.
>ELSE
> This.Parent.Command1.ENABLED = .F.
> This.Parent.Command2.ENABLED = .F.
> This.Parent.Command3.ENABLED = .T.
> This.Parent.Command4.ENABLED = .T.
>ENDIF
>ThisForm.REFRESH
>
>( > )
>IF NOT EOF('person')
> SKIP 1 IN person
>ENDIF
>IF EOF('person')
> GO BOTTOM IN person
>ENDIF
>IF NOT EOF('person')
> This.Parent.Command1.ENABLED = .T.
> This.Parent.Command2.ENABLED = .T.
> This.Parent.Command3.ENABLED = .T.
> This.Parent.Command4.ENABLED = .T.
>ELSE
> This.Parent.Command1.ENABLED = .T.
> This.Parent.Command2.ENABLED = .T.
> This.Parent.Command3.ENABLED = .F.
> This.Parent.Command4.ENABLED = .F.
>ENDIF
>ThisForm.REFRESH
>
>( >| )
>GO BOTTOM IN person
>This.Parent.Command1.ENABLED = .T.
>This.Parent.Command2.ENABLED = .T.
>This.Parent.Command3.ENABLED = .F.
>This.Parent.Command4.ENABLED = .F.
>ThisForm.REFRESH