Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CGrid
Message
From
08/03/1999 15:04:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
CGrid
Miscellaneous
Thread ID:
00195287
Message ID:
00195287
Views:
61
I've got a real humdinger, whatever that means! On just a plain vanilla cBizobj form, I have a plain vanilla cPageframe. On page1 I have a single bizobj. The bizobj simply opens some free cursors. The init method of the form runs a query and creates a cursor. A command button runs another query based on a pick list, activates page2, and poplulates my grid. Runs like a charm. I have to reset my grid's rowsource property each time I run the query, but this has never been a problem.

Here's the problem. (Hold on to your seats!) I have a combobox that sets a filter on the cursor. When I try this from the command window it runs fine. Example:

SET FILTER TO HC_CODE='0P'
_SCREEN.ACTIVEFORM.REFRESH()

If I put this code in the valid event of my combobox. I get all kinds of errors. Mostly Operator/Operand mismatch. The error tells that it is in the refresh method of the grid, but the debug window tells me the line of Code in the valid event of my combobox is the culprit.

Here's the code:
LOCAL loSelect

loSelect = CREATEOBJ('cSelect', 'cFinal')
SET FILTER TO
SET FILTER TO ALLTRIM(hc_code) = THIS.VALUE

thisform.refresh()

I have verified that THIS.VALUE contains a valid character value, which matches the value in the cursor. There is no reason why this would work in the command window and not in the form. Especially when I have doene this while the form is running. Any suggestions?
Next
Reply
Map
View

Click here to load this message in the networking platform