 | | From: | Alan Fitch | | Subject: | Combobox_onChange | | Date: | Wed, 19 Jan 2005 10:34:43 -0500 |
|
|
 | I have a form with combobox, datasource is an array. Form opens with a user id in the box. When it is changed by selection the program goes of into a loop. Eventually a program alert box comes up stating 'To many nested DO/UDF procedures'
Adding a button with the same action code works ok.
Using radiobuttons also works, but not the combobox. Below is the called code,watch for wrap.Can anybody explain please?
function cbfilter_onChange form.userid = form.cbfilter.value form.resetgrid() return This does not work function PUSHBUTTON1_onClick form.userid = form.cbfilter.value form.resetgrid() return This works
function resetgrid form.jobs1.active = false if form.userid = "*ALL*" form.jobs1.sql = [select * from jobs Order by ] + form.rsOrder else form.jobs1.sql = [select * from jobs where fee = false and ID = "] + form.userid + [" Order by ] + form.rsOrder + [,surname] endif form.jobs1.active = true with (form.NOTES1.rowset) autoEdit = false masterRowset = form.jobs1.rowset masterFields = "RefNo" endwith form.jobs1.rowset.first() form.grid1.refresh() form.grid1.setfocus() return
|
|
 | | From: | Todd Kreuter [dBVIPS] | | Subject: | Re: Combobox_onChange | | Date: | Wed, 19 Jan 2005 18:17:55 -0500 |
|
|
 | Alan Fitch wrote: > > I have a form with combobox, datasource is an array. Form opens with a user id in the box. When it is changed by selection the program goes of into a loop. Eventually a program alert box comes up stating 'To many nested DO/UDF procedures'
Is the combobox datalinked?
I've had similar battles in the past, though I don't recall the details at the moment. It may have had something to do with the fact that the combobox onChange fires but the dataLinked field was not updated for the change and there was some internal struggle going on with the rowset save method and what I was tring to do in my onChange code.
-- Todd Kreuter [dBVIPS]
|
|
 | | From: | Alan Fitch | | Subject: | Re: Combobox_onChange | | Date: | Thu, 20 Jan 2005 05:24:09 -0500 |
|
|
 | > > Is the combobox datalinked? > Might be the same problem Todd.
No datalink being used. Just using it as a means to select User id from a list. Client thought it looked better than a listbox. I think we will have to stick to a seperate pushbutton ti trigger the change. Could this be why the newsgroup selection here is triggered by a pushbutton?
Regards Alan
|
|
 | | From: | Todd Kreuter [dBVIPS] | | Subject: | Re: Combobox_onChange | | Date: | Thu, 20 Jan 2005 10:14:15 -0500 |
|
|
 | Alan Fitch wrote: > > >
> No datalink being used. Just using it as a means to select User id from a list. Client thought it looked better than a listbox. I think we will have to stick to a seperate pushbutton ti trigger the change. Could this be why the newsgroup selection here is triggered by a pushbutton?
You could try playing around with it. Do somehting like setting the comboboBox.onChange = null in the combobox onChange, then set the combobox.onChange = class::cbFilter_onChange when done processing your code.
-- Todd Kreuter [dBVIPS]
|
|