Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird time to get Error 5 - Record is out of range
Message
De
04/04/1999 00:28:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00204927
Message ID:
00205043
Vues:
18
Hi Allan ---

Your problem, then, is opening the cursor in the Init of the form. Not good. Controls instanciate before the container (form). Try moving the rowsource cursor to the data environment. Also, I'm confused: If the combobox does not have a controlsource, then how is it "bound"?

>
>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.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform