Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox and Filter
Message
From
23/12/2004 09:49:26
 
 
To
23/12/2004 07:26:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00971725
Message ID:
00971776
Views:
23
I have used your code of valid combo method, but when I click on the list box appear the message "This can only be used within a method".

Then you did not use my code in the Valid method of your combo or else you would not have gotten this error. Look more closely at the code (modified for use with numeric value) in the Valid method of my combo:
PROCEDURE combo1.Valid
  LOCAL lcFilter
  SELECT < Table used to populate RowSource of List Box >
  lcFilter = [ < field in List Box Cursor that defines the filter > ] + TRANSFORM( this.Value  )
  SET FILTER TO &lcFilter
  GO TOP
  Thisform.List1.Requery()
ENDPROC
I am guessing that the reason you are getting the error you describe is that you are trying to set the filter using this (incorrect) syntax:
SET FILTER TO < Field in List Box Cursor > = This.Value
Previous
Reply
Map
View

Click here to load this message in the networking platform