Solved

Problem with Foxpro 6 list box refreshing

Posted on 2011-02-26
2
954 Views
Last Modified: 2012-06-21
I have a fairly complex application (to do with plants) that has two list boxes to select records in a table.  One uses a field called 'species' and the other a field called 'com_name'.  As well as this the order can be set to five different values (species, com_name, form, family,flr_col).  All goes well till I change the index to something other than the default 'species'.  After moving around in the table the list box looses some of the records, showing blank spaces.  If you click in a blank space the name appears.
The list box is on a separate page of the pageframe but the result is the same if on the same page.  I use the code
thisform.pageframe1.page11.lstSelcomn2.listitemid = listid
thisform.pageframe1.page11.lstSelcomn2.setfocus
thisform.pageframe1.page11.lstSelcomn2.refresh

to refresh the list but this still does not work.
If the index is set to say 'family' it is set back to 'species' when the page containing the list box is selected, then back to 'family' after the selection is made.

Is there any other code that will keep the list box refreshed?
The first image shows when it goes bad and the second one is when I click on a blank area.  Some of the items come back but not all. List box with blanks List box after clicking - some names seill missing
0
Comment
Question by:Conroy111
2 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 34990969
You may try to call

thisform.pageframe1.page11.lstSelcomn2.requery  after index change.

It should reread the listbox items from the row source.
0
 

Author Closing Comment

by:Conroy111
ID: 34993174
Thanks pcelba, fixed it completely.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Note: This is the second blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   Every month t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now