Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 5 - in a parameterized view with a combobox in grid
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Error 5 - in a parameterized view with a combobox in grid
Miscellaneous
Thread ID:
01137625
Message ID:
01137625
Views:
70
See problem below - possible solution, but I do not understand why it works?

In the lostfocus event I have the following code snippet:

IF this.lInGrid
this.Parent.Parent.rowheight=this.rowheight
ENDIF

lInGrid is a property of the combo box to tell if it is in a grid. If I comment the above code out, I do not have any errors? Any ideas?

Mike


I have a view that has 8 columns, The first one is a combobox, the rest are check boes.
The grid has a bldGrid method that is called when it is initialized to place the appropiate controls in the grid. It also has a setgrid routine to set up column widths, controlsources, activecontrols, etc. (Also called from the init.)

The issue is this. I run the query that gets the view information, then refresh the grid. (The grid's recordsource is specified to the view.)

The combobox's rowsource is an sql query, rowsourcetype 3.
During the gotfocus event of the combo a requery and a refresh of the combobox is done.Prior to leaving the combobox gotfocus event, I make sure the underlying view is selected. Also, the combobox's controlsource is the underlying field in the view.

The grid is readonly by default.

If I do the following, I get the error, "5 Record is out of range", every time.
Click on the comboboc, then click on one of the checkboxes. The minute I click a checkbox, the error occurs, and in the debugger it states that it is in the GridMouseDown event.

Now, if I remove the combo box, from the column and just use a textbox, there is no issue, no errors etc. Therefore it must be something in my combobox... but what?

TIA,
Mike
Reply
Map
View

Click here to load this message in the networking platform