Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Building object name and calling it
Message
De
04/03/2017 13:24:15
 
 
À
04/03/2017 10:57:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01648762
Message ID:
01648779
Vues:
41
I solved the problem of all objects reverting to the data in the last record by 'disconnecting' the object fields from their datasource after populating them with the required data. They have their 'value', and don't need underlying data after the value is set...
zrecs=RECCOUNT()
IF zrecs>0
	x=1
	GO top
	DO WHILE x<=zrecs
		IF x<=zrecs
			GO x
		ELSE
			EXIT
		ENDIF 
		thisobject='Dayjobsline'+ALLTRIM(STR(x))
		thisform.&thisobject..visible=.t.
		thisform.&thisobject..SetAll("controlsource",'',"EditBox") &&remove the datasource here, and the 'row' keeps the correct data! I know it's cheap and dirty, but it works.
		x=x+1
	ENDDO 
ENDIF
Thanks for all the help! If you have a more elegant solution, I look forward to seeing it!!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform