Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difficulty requerying combo boxes
Message
From
05/01/1999 14:47:47
Cheryl Qualset
Qualset Computer Consulting
Davis, California, United States
 
 
To
31/12/1998 16:17:17
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00170740
Message ID:
00172893
Views:
22
>Kevin,
>As usual, I continue to forget things... thanks for reminding me.
>
>Roy
>
>>Roy,
>>
>>>I follow what you are saying but I am not using the bizobj requery() to update the combos. I have code in the form.activate() (just for test purposes) that calls the requery method of the combos themselves. If I check the cursor after the requery of the combobox executes it is still empty. I am at a complete loss why this works this way.>
>>
>>If I understand you correctly, you are calling the Requery() of the ComboBoxes, but *not* requerying the actual view?
>>
>>If this is the case, you need to requery both the view AND the combobox. Comboboxes and Listboxes are strange animals in that you need to requery them if their RowSource changes...so you always do the Requery in pairs. For example:
>>
>>REQUERY('v_view1')
>>ThisForm.PageFrame.Page2.Combobox.Requery()
>>

I put the view requery in the combobox requery method.
CQ

>>>In my previous projects, I have used a SQL statement to create a temp cursor in the control.init and drop it in the .destroy(). After looking at your examples, I switched to putting the lookup view (no parameters - just a straight view) in the bizobj environment and changing to a 6 - Fields rowsource type. It worked as long as I populated the views by turning off the NoDataOnLoad - or at least until I found I had deleted records in the combos.>


The deleted records are showing up in the views because of code in the cDataEnv that unconditionally sets deleted off before it opens the tables. This is generally not the desired behavior in my apps, especially since there is no way to tell a deleted record from an non-deleted one after the query. Some people have added a field to their views (DELETED() AS ldeleted) to get around this. I prefer to control the deleted setting and only use the added field when I need to see the deleted records.

Cheryl

>>
>>That's because if you have NoDataOnLoad set to False, then you don't need to issue a Requery to the view.
>>
>>Regards,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform