Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LIST BOX AND ARRAY PROBLEM (with acopy)

Status
Not open for further replies.

JWilsonny

Programmer
May 8, 2001
46
US
I have a list box on a form (list2). The (rowsource) is set to variable F_START and the (rowsourcetype) is set to (array). My variable F_START is an array generated from the ACOPY command and contains a list of dates depending on what the user has selected in an optionbox on the form. If they select option 1 - acopy copies array1 to F_START and option 2 copies array2 to F_START.

Here is the problem - when the user scrolls through the listbox LIST2, all the dates are there but if they move to the bottom or end of the date data a .F. appears in the box. If they try to move back up the list nothing happens just the .F. and there is no way to get the array data to display without exiting and reentering the form??

I execute this but there is no change.

ACOPY(SPPER,F_START)
THISFORM.OPTIONGROUP3.OPTION1.VALUE=1
THISFORM.LIST2.Requery
 
After investigating further it seems that the listbox controls take the user past the end of the array somehow and that is where the .f. is coming from. How do I make it stop at the end of the array?
 
JWilsonny

After investigating further it seems that the listbox controls take the user past the end of the array somehow and that is where the .f. is coming from. How do I make it stop at the end of the array?

I'm not sure what you mean by "the listbox controls take the user past the end of the array". I suspect your array has one too many elements. Check in the debugger, and look at the array to see if the last element if .F.. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top