Solved

Problem with Foxpro 6 list box refreshing

Posted on 2011-02-26
2
949 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

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…
Find out what the Office 365 disclaimer function is, why you would use it and its limited ability to create Office 365 signatures.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 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