Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Shaheryar Rashed
  Where is Shaheryar Rashed?
 Multan
 Pakistan
 Shaheryar Rashed
 Tags
Subject: RE: end of file occurs
Thread ID: 310935 Message ID: 310940 # Views: 47 # Ratings: 2
Version: Visual FoxPro 6 Category: Forms
Date: Monday, June 27, 2011 11:41:05 AM         
   


> hi experts !
> i am having end of file problem with following code:
>
>
> do while !eof()
> mstrname = ''
> sele store
> LOCATE for strcode = strcode and mcocode = cocode
> IF found()
> mstrname = strname
> ENDIF
> sele pjbook
> repl strname with strname
> ThisForm.Grid1.Column5.Text1.Valid()
> mpcode = pcode
> mpname = ''
> mppicture = ''
> sele product
> LOCATE for pcode = mpcode and unitype # 'GROUP'
> IF found()
> mpname = pname
> mppicture = allt(ppicture)
> ENDIF
> sele pjbook
> repl pname with mpname
> repl ppicture with ALLT(mppicture)
> ThisForm.Grid1.Column2.Text1.Valid()
>
> sele pjbook
> if .not. !eof()
> skip
> endif
> enddo
>
> please guide me to correct it

Which table does the DO WHILE !EOF() command refer to. Better to use SCAN /ENDSCAN instead. You should not be calling .valid events are they are events and not methods.

Regards
Tushar

ENTIRE THREAD

end of file occurs Posted by SHAHERYAR RASHED @ 6/27/2011 11:25:59 AM
RE: end of file occurs Posted by tushar @ 6/27/2011 11:41:05 AM
RE: end of file occurs Posted by Yahia Aboudalal @ 6/27/2011 12:47:25 PM