Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locate not working right
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00669297
Message ID:
00669600
Vues:
12
Sorry to jump in but are you absolutely sure that the current table is the one you think it is - I know that selecting a grid will often change the current alias so when you come back to the Locate it may be doing it on the wrong table - just a thought.

I often do a explicit Select before a Locate just to make sure.

Caroline

>Hi Jim, I tried that too and it didn't work. I have a grid on the same page, when my user clicks on the grid selection, the data in fields below change. Can the grid be affecting the locating of the records? Deletes doesn't seem to work either, it won't refresh my grid with new data event though sendupdate is .t. I changed the thisform.f to a local variable:
>
>zx = a__gen12(1,1)
>LOCATE FOR lv_veh_assign.a_uniqueid = zx
>
>But that didn't work either.
>
>>Nick,
>>
>>Add the Thisform in the LOCATE. LOCATE does not work with WITH/ENDWITH
>>
>>
>>WITH thisform
>>	hrecno = RECNO()
>>	.visible = .f.
>>	DO FORM add_assign WITH  .a  && .a is master rec id
>>	.visible = .t.
>>	lc_id = .a
>>	REQUERY('lv_veh_assign')
>>	lvassign = RECCOUNT('lv_veh_assign')
>>	IF lvassign > 0
>>		SELECT MAX(lv_veh_assign.a_uniqueid) FROM lv_veh_assign ;
>>			WHERE lv_veh_assign.a_id = .a INTO array a__gen12
>>		.f = a__gen12(1,1) && .f is the uniqueid for lv_veh_assign
>>* Note Thisform added on the next line
>>		LOCATE FOR lv_veh_assign.a_uniqueid = Thisform.f
>>		RELEASE a__gen12
>>		.f = lv_veh_assign.a_uniqueid
>>		.pf1.p3.cmddelassign.visible = .t.				
>>		.pf1.p3.refresh()
>>	ELSE
>>		.pf1.p3.cmddelassign.visible = .f.
>>	ENDIF
>>endwith
>>
Caroline
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform