Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble populating into grid
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Trouble populating into grid
Miscellaneous
Thread ID:
01252232
Message ID:
01252232
Views:
76
I am working on a database that was largely built by someone else, who is no longer with the company.

I have built a new form, which I need to populate data from a table within the database, which are entered into the form frmreports. The new form is called frmvwrptnts. Both of these forms come from the form frmviewsite. The txtID is the primary index. The code for the button leading to frmreports is:
thisform.txtID.Refresh
IF THISFORM.txtSite.ReadOnly = .f.
	MESSAGEBOX('You must save before viewing the reports form!',16,'WAIT!')
ELSE	
	IF thisform.txtID.Value < 10000
		STORE ALLTRIM(STR(thisform.txtID.Value,8,3)) TO m.reportid
		STORE ALLTRIM(thisform.txtSite.Value) TO m.reportsite
	ELSE
		STORE ALLTRIM(STR(thisform.txtID.Value)) TO m.reportid
		STORE ALLTRIM(thisform.txtSite.Value) TO m.reportsite
	ENDIF		
	DO FORM frmreports.scx
ENDIF
Therefore, I similarly made the code for the frmvwrptnts as:
thisform.txtID.Refresh
IF THISFORM.txtSite.ReadOnly = .f.
	MESSAGEBOX('You must save before viewing the reports form!',16,'WAIT!')
ELSE	
	IF thisform.txtID.Value < 10000
		STORE ALLTRIM(STR(thisform.txtID.Value,8,3)) TO m.notesid
		STORE ALLTRIM(thisform.txtSite.Value) TO m.notessite
	ELSE
		STORE ALLTRIM(STR(thisform.txtID.Value)) TO m.notesid
		STORE ALLTRIM(thisform.txtSite.Value) TO m.notessite
	ENDIF		
	DO FORM frmviewrptnts.scx
ENDIF
In the grid, I have set the control source to reports.rptname, etc. (reports is the table where the data is stored). However, this does not populate any of the needed data for me. Obviously I am missing at least one step, but I am not sure of what it is. Hopefully this all made sense.
SDDENR
Next
Reply
Map
View

Click here to load this message in the networking platform