Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter
Message
From
19/01/2005 10:18:41
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
19/01/2005 10:03:15
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Filter
Environment versions
Visual FoxPro:
VFP 5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00978510
Message ID:
00978544
Views:
22
Mohammed

Never use property in LOCATE FOR or SET FILTER! Always use macro substitution. Variable disappears (goes out of scope) when method ends!
if nkeycode=13
   SET FILTER TO
   LOCAL m.ldDat
   m.ldDat = thisform.text2.Value
   LOCATE FOR dat = m.ldDat
   IF FOUND()
      LOCAL m.lcMonth
      m.lcMonth=TRANSFORM(MONTH(thisform.text2.Value))
      SET FILTER TO MONTH(dat)=&lcMonth.
      LOCATE
      thisform.grid1.Visible=.t.
      thisform.grid1.Refresh
      thisform.grid1.column7.setfocus()
   else
      =messagebox("åÐÇ ÇáÊÇÑíÎ ÛíÑ ãæÌæÏ ")
      thisform.grid1.visible=.f.
   ENDIF
endif
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform