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:
00669344
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform