John,
Thanks for replying to my question.
That's right (rowsource=2). The cursor is opened in the init event of the form. It is being used in a relation with another table. When the record advances in one table, I have a method to locate the corresponding record in the cursor.
The combobox does not have a control source but is bound to the first field/column of the cursor.
Al
>Hi Allan ---
>
>You mean combobox.rowsource=2 (Alias) right? OK, when and how is the cursor used as the rowsource opened? Is it being used in a relation with any other table?
>
>What is the controlsource for the combobox? (Is it bound?). If so, are there records in the bound table. If it is a bound control, try using a Replace on the controlsource and a Refresh of the control to change the value.
>
>
>>I have a form in which the contents of a dropdown list are based on a cursor (rowsourcetype=2). The dropdown list is called 'cboPickAcct'
>>
>>I have a custom property in the form named 'glaccount' which is changed depending on the actions of the user. I have a method that is supposed to change the value of cboPickAcct with the following code:
>>
>>thisform.cbo.PickAcct.value = thisform.glaccount
>>
>>Problem is that occasionally I get the following error message:
>>
>>Record is out of range (Error 5)
>>
>>I have stepped throug the code in the debugger - looking at the tables that have had their order changed and even confirmed that the value in the custom property glaccount was correct.
>>
>>I am stumped as to why I am getting error message 5 when I'm simply attempting to replace the value of a dropdown list with a custom property of the form.
Al Williams
Anola MB, CANADA