Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building object name and calling it
Message
From
04/03/2017 13:24:15
 
 
To
04/03/2017 10:57:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01648762
Message ID:
01648779
Views:
39
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!!
Previous
Reply
Map
View

Click here to load this message in the networking platform