Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox crashes VFP when clicked on
Message
From
15/02/2012 20:34:19
 
 
To
15/02/2012 17:23:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01535512
Message ID:
01535523
Views:
80
>I'm having a problem with a Listbox on a form. I'm using a cursor as the data source, and the control source is a property on the form. The listbox loads, but when it is clicked on FoxPro crashes. This is still in development, so I'm still running VFP, not an EXE.
>
>The cursor (from SQL data) has 3 columns, and approx 4100 rows.
>
>This happens every time I test it. I have a separate Listbox on the same form that runs fine, but it's cursor only has approx 100 rows.
>
>Both of the listbox's were created from the FoxPro base listbox.
>
>I've attached screen shots of the Data tab and the error.

You have the .ControlSource = "thisform.cMarketHotel" - is that correct? I don't use listboxes often, but I usually set:
WITH < MyListBox >
  .RowSourceType = 2
  .RowSource = "CursorAlias"
  .ControlSource = "CursorAlias.SomeColumn"

ENDWITH
I seem to recall people running into problems with too many rows in a listbox or combobox. In your case you also have 3 columns, so a total of ~12,300 "cells".

Could you have one or more funky characters in any of the data rows e.g. containing a CHR( 0 )?

You could also reduce the amount of data to see if you still have the problem e.g.

- test with 2 columns, or just 1, instead of 3
- test with 1/2 the rows, 1/4, 1/8 etc.

If it works with less data, maybe that could point to a data problem in a column, or in the first half or second half of the rows etc.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform