Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List views that don't like to be refreshed
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00137452
Message ID:
00137453
Views:
17
>I've got a form that has a combo box on it, and two list boxes. The Combo lets the user select which division of info they'd like to work on. As soon as they pick an option, I set a view parameter and refresh the query (in the Click() Method of the object). I also refresh the view on the listbox on the left hand side of the screen. The list view on the right hand side is blank until they select something off the list on the left. Once they pick something, I again set a view parameter and refresh this other view.
>
> It works OK, but I've noticed a problem with refreshing the list views. At first, after requerying the view the information on the list wouldn't be displayed until it received focus - then it would appear. So I added (something like)the following code to the Click() method of each control:
>
>THISFORM.CListboxl2.ListBox.SetFocus()
>THISFORM.Clistboxl2.Listbox.Refresh()
>THISFORM.Refresh()
>
> This works, but I've noticed if I click between the two list boxes a bit I'll get a "Record is out of Range" error. I'm sure it has something to do with the way I'm refreshing this list, but I don't know how else to do this.

After your changed rowsource content, you should issue List.Requery to get new content to the listbox.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform