Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difficulty requerying combo boxes
Message
From
28/12/1998 11:58:31
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00170740
Message ID:
00170805
Views:
28
Kevin,
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.
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.

I need the user to be able to add to the lookup table "on the fly" by activating the lookup table editor, adding the new entry, and going back to the form and having the combo show the new entry. I added a cmdbutton to the form to activate the editor and set a form property to indicate that the editor was actived. After adding the new record to the lookup table and clicking back on the original form, I have added in the form.activate method a check to see if the editor was activated (checks and resets the form property)and then runs the requery method of the combobox. But nothing is returned...

Any suggestions (besides moving to South American) ????

PS - Has the update to correct the deleted records issue with NoDataOnLoad = .f. been posted???

>Roy,
>
>>I am having difficulty in getting my combo boxes to populate on a nolist form. I am using a single bizobj to open all views - one to manipulate, the other three just populate the comboboxes and are lookup only. Initially, I turned off the NoDataOnLoad checkbox on the lookup views and everything was OK until I found I was getting deleted records in the comboboxes.>
>
>>I turn the NoDataOnLoad back on but I cannot get the Combo to requery or populate the view (there is no view parameter). The requery call runs (tried in form.activate()) and I can step through it but the views and the combos do not populate...>
>
>The business object's Requery() method only requeries the InitialSelectedAlias. This is by design, since the Framework should not assume that all associated lookup tables should be requeried at the same time. It provides finer control over view requerying.
>
>For example, if you have a combobox on page 2 of a form, you really don't need to requery the combobox's associated view until the user clicks on page 2. This delayed requery ("just in time" data fetching) helps speed the instantiation of forms and keeps network traffic to a minimum.
>
>That said, if you *do* need to requery the lookup views at the same time the business object is requeried, you can simply put discrete commands to requery the views in the business object's PostRequeryHook(). For example:
>
>REQUERY('v_view1')
>REQUERY('v_view2')
>
>As its name suggests, PostRequeryHook() is executed each time the business object is Requeried.
>
>Regards,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform