Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using eof()
Message
From
06/12/2005 14:04:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01075287
Message ID:
01075457
Views:
23
Thanks Terry
Yes it is needed for eof(). I guess that is because of the phantom record that one needs to deal with. With bof() you don't.

I am creating a follow up system for users that put free form notes in the insurance policy notes that require follow up. When they create the follow up note, it is captured along with some other data in a separate follow up table. When they log on each day a screen will come up that is merely an edit box on a form containing all open notes, so the user is forced to review the follow up notes at least on a daily basis. (Mgt requirements this as they have grown so fast and the volume of notes is getting larger and larger and the employees are forgetting they have pending item that require action. Lost a $300,000 policy recently because someone failed to follow up.) As they click through the table the note is displayed in the edit box. Control source for the edit box is the underlying follow up table. That is why the thisform.refresh

I looked at your RIO code some time ago and liked what I saw. I will look at this again for the hard assignment you mentioned.

Sorry for being verbose, but this client has grown from less than a million in premiums and 1 1/2 employees a little over 2 years ago and is now over 40 employees and is looking at 43 million in premiums this year. It has been like Mr. Toads wild ride.

Thanks
Gaylen



>I think you have to check if the next record is EOF
>skip && at last record
>if eof()
> skip -1
>endif
>
>I can rcall if this a a bof() or eof().
>
>I noticed you are using thisform.refresh. So I guess you are binding your controls. The best performance (and maximum control) results from hard assignments (IMO):
>myform.mycontrol.value=mydbf.fieldvalue
>
>There is an example, if you're interested, of "hard assigment" performance in download #16575 .
>
>
>>I have an edit box on a form with several controls. One is to move to the next record(NEXT) and the other is to move to the previous record (PREVIOUS). The code in the next button is as follows:
>>
>>
>>Select cursor
>>
>>If  Eof()
>>	Wait Window "Last Note" Nowait
>>Else
>>	Skip
>>Endif
>>Thisform.Refresh
>>
>>
>>
>>
>>When it get to the eof()it will show the last record and the next time you click the NEXT button the edit box is grayed out. Evidently on the phantom record.
>>
>>Going the other way (previous)and using the same code but using BOF() it stops at the first record no matter how many times you click the PREVIOUS button.
>>
>>How do I get around the blank(gray) edit box. I know it must be something simple but I need to demo this tomorrow and would like to avoid the gray box.
>>
>>
>>Thanks
>>Gaylen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform