Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locate not working right
Message
De
19/06/2002 12:07:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00669297
Message ID:
00670170
Vues:
17
Nick,

I think there has been some confusion in this thread, because in your original post you had a typo:
LOCATE FOR lv_veh_assign.a_uniqueid = .f.
Instead of:
LOCATE FOR lv_veh_assign.a_uniqueid = .f  && where .f is a property of the form
Because of the typo, John K. thought you were trying to locate a boolean value (.f.) on an integer field. There is no problem doing a locate on an integer field.

I wonder if you don't have the correct work area selected when your locate executes. Assuming the work area is lv_veh_assign, see changes below:
>	DO FORM add_assign WITH .a TO curmil
>	.visible = .t.
>	lc_id = .a
>	REQUERY('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
>		* zx = a__gen12(1,1)              && is this necessary?
>		.pf1.p3.cmdaddassign.setfocus() &&take focus off grid
>		* lv_veh_assign.a_uniqueid = zx   && is this necessary?
                select lv_veh_assign
>		LOCATE FOR a_uniqueid = a_gen12(1,1)
>
>this gave me the error of missing operand when I save this code. I also tried >
>
lv_veh_assign.a_uniqueid = zx
>and that didn't help because john said that integers are a no no. What is basically taking place here is I am going out to another form to allow user to add a >
>
< snip >
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform