Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record out of range error
Message
De
02/07/2007 11:18:55
 
 
À
02/07/2007 11:09:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01237135
Message ID:
01237151
Vues:
17
If you pass the number itself:

lnrecno = recno('mytable')
DO FORM myform WITH lnrecno...

and then verify that anything on the form is not relying on a record number (e.g. a grid) that is not available in the creation of the form and its objects, does it do any good?


>>What does:
>>
>>
>>SELECT curOrderParts
>>SET ORDER TO PriDetID
>>IF INDEXSEEK(curGridItems.PriDetID,.T.,'curOrderParts')
>>    DO FORM frmOrderParts WITH RECNO("curOrderParts") TO locSaved      && <== Error
>>ELSE
>>    MESSAGEBOX("Please select a part before proceeding.",0+48)
>>    RETURN .f.
>>ENDIF
>>
>>
>>do?
>
>Looks up a part number and calls the form to modify it.
>
>Does the form frmOrderParts use the default data session? What code do you have in the load or init of the form to handle the table and record position?
>
>Error is thrown at the start of the DO FORM statement. I would beleive if the error is occuring in the form (INIT, LOAD) then the error would be thrown there instead.
>
>The client is not exectly clear as when the error is occuring. Either before the Parts Number form appear or after the have exitted the form. I am think that perhaps if the record pointer has moved on return from the form then the RECNO() statement would no longer point to a valid record. What do think? Should I set a local variable to the recno() and then use that when passing it to the form? I guess it couldn't hurt.
>
>Thanks for your thoughts.
>
>>
>>
>>
>>
>>>Hi all,
>>>
>>>We have been receiving a "Record out of range" error in the following code snippit. It appears to be the RECNO("curOrderParts") expression, but that does not make any since to me. Has anyone encountered this before?
>>>
>>>
>>>SELECT curOrderParts
>>>SET ORDER TO PriDetID
>>>SEEK curGridItems.PriDetID
>>>
>>>IF FOUND("curOrderParts")
>>>	DO FORM frmOrderParts WITH RECNO("curOrderParts") TO locSaved      && <== Error
>>>ELSE
>>>	MESSAGEBOX("Please select a part before proceeding.",0+48)
>>>	RETURN .f.
>>>ENDIF
>>>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform