Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you find the problem?
Message
 
 
To
08/10/2001 17:53:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00565709
Message ID:
00565718
Views:
18
This message has been marked as the solution to the initial question of the thread.
Hi Vicki,

SET FILTER expression is evaluated every time the pointer in a table moves not at the time when it's issued. In this case thisform.grid1.refresh() will casuse FILTER expression to be evaluated. I guess, at that point THIS is a grid not a form. To avoid problem like that include property values directly into filter expression
lcFilter = [somefield = "] + this.mstatus + ["]
Set filter to &lcFilter 
>I have a fairly simple form that displays a list of records with one filter. There is a set of two radio buttons to change the filter. When you click on one of the buttons, the interactive change method does the following:
>
> thisform.mstatus = iif(this.value = 1,"A","C")
>
>There is an mstatus_assign method that fires when we change mstatus:
> usual parameter
> this.mstatus = m.newval
> set filter to this.mstatus
> thisform.grid1.refresh()
>
>Seems simple, but everytime I do it, I get a message "Property mstatus is not found." Mstatus is defined as a public variable on the form. The variable this.mstatus has the correct value in it when I check prior to the grid refresh. The form and grid are both staight from the standard libraries, no new code in refresh or anything like that. What bonehead thing am I doing or overlooking???
>
>P.S. I will gladly email this code with a sample table set if you'd like to see it; it's all very small. But it's driving me crazy....
>
>TIA!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform