Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yahya Abou dalal
  Where is Yahya Abou dalal?
 tripoli
 Lebanon
 Yahya Abou dalal
 To: Shaheryar Rashed
  Where is Shaheryar Rashed?
 Multan
 Pakistan
 Shaheryar Rashed
 Tags
Subject: RE: end of file occurs
Thread ID: 310935 Message ID: 310950 # Views: 31 # Ratings: 0
Version: Visual FoxPro 6 Category: Forms
Date: Monday, June 27, 2011 12:47:25 PM         
   


> 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

Hi
This line
if .not. !eof()
have two nots: .not. and !
there combination give .t.: if eof()
which not what you are meaning.
So you have to remove one of the not: if !eof()
Yahia

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