Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting a field in a thread
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01302201
Message ID:
01302204
Vues:
6
If you want to set value to a field, then use replace command, or gather.

You're setting the variable needDmr to .t., but displaying a value of the field (field always takes precedence over the variable). If you want to check variable's value, use m.needDmr

m. was one of the sore points at one of my previous jobs <g>

>Ok, I think we've just been looking at this thing for so long. In a larger code, we fixed many other errors and seem to have it all working but this one line. We are simply trying to set this field to True or False once everything else has been done. However, the field (needdmr) stays false regardless of what we tell it to do.
>
>m.i = 1
>USE epa_limits
>GO TOP
>DO WHILE NOT EOF()
>USE epa_limits
>GOTO m.i
>	m.npidcomp = ALLTRIM(Npid)
>	MESSAGEBOX(m.npidcomp)
>	IF limit_type = "Scheduled"
>		USE epa_facility_info
>		LOCATE FOR ALLTRIM(npid) = m.npidcomp
>		IF FOUND()
>		needdmr = .T.
>		MESSAGEBOX(needdmr)
>		ENDIF
>	ELSE
>		needdmr = .F.
>	ENDIF
>	
>	IF EOF()
>		EXIT
>	ELSE
>		m.i = m.i + 1
>	ENDIF
>ENDDO
>
>When that messagebox(needdmr) pops up, it still says that needdmr is false (right after telling it to be true). Is my syntax incorrect there or something?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform