Jeffrey,
If there are no records in a table you are automatically at EOF(). However, you can still scatter memvars (for example) and have them populated as though you did a SCATTER MEMVAR BLANK.
If you have records in a table doing a GO TOP or LOCATE (I recommend LOCATE) will
not return a .T. as you might expect. Issuing a GO BOTTOM will also not return a .T. either. In each case you need to perform an additional SKIP -1 or SKIP and then test for the condition.
Here's an example:
SELECT PATIENT_VIEW
LOCATE
IF NOT BOF()
SKIP -1
IF BOF()
LOCATE
ELSE
SKIP
ENDIF
ENDIF
>Here what I have:
>
>SELE PATIENT_VIEW
>GO TOP
>
>IF BOF()
> THISFORM.TOPFILE = .T.
> THISFORM.ENDFILE = .F.
>ENDIF
>
>but it's not catching and reading BOF(). the topfile property and endfile property are being set to .F. That's why the buttons are refreshing correctly.
Best,
DD
A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.