Quoting Tracy Pearson <[EMAIL PROTECTED]>: VFP 9... Yes the combo box just displays the string.. a little more details... I tried commenting out all of the code in the GotFocus event of the combo and it still craps... I then looked into the lostfocus event, code below
IF this.lInGrid this.Parent.Parent.rowheight=this.rowheight ENDIF If I comment out the code above, no errors occur.. Any ideas what is going on? TIA, Mike > What version of VFP? > The Grid is ReadOnly, meaning the ComboBox is strictly to display a > string? > > Tracy > > > -----Original Message----- > From: [EMAIL PROTECTED] > Sent: Wednesday, July 19, 2006 12:09 PM > Subject: Error 5: In a grid with a combobox > > > I have a view that has 8 columns, The first one is a combobox, the rest > are > check boxes. > > 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 combobox, 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 > > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

