Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to QUICKLY determine if table does not have any reco
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01413534
Message ID:
01413594
Views:
38
>>You could do
>>
>>
>>SELECT poshold
>>LOCATE
>>Thisform.cmdrelease.Enabled = NOT EOF()
>>
>>
>>Locate will try and find the first record if it's at EOF then it found none.
>
>Interesting..... Thanks!

I don't know exactly what you have but when I've wanted to enable/disable based on records. I do that code in the init to set the button's initial state. Then at the end of the delete method I do it again to make sure they haven't deleted all the records. Then in the save of the add method I enable the button because I know there is now a record. Edits/forward/backwards/lookups I don't need to mess with the button because they aren't messing with the number of records. From previous post I believe people have stated that locate is faster then go top and bottom when the table is filter or set deleted is on.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform