Solved

Problem with Foxpro 6 list box refreshing

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
one to many join on two fields vfp 2 676
Fox 9  Using datetime field types 2 328
What are the steps to set up and utilize winSCP in FoxPro (9) 3 156
FoxPro comparing columns 2 77
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…
When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 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

11 Experts available now in Live!

Get 1:1 Help Now