Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display data in a grid
Message
 
 
À
14/03/2002 20:01:48
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00633175
Message ID:
00633221
Vues:
19
Did you check if cursor LabTestsInfo has any records?

>Hi All:
>
>My form consists of a grid that should not display anything when the form is initialized. In the Init method of the form, I have declared some variables. The grid's recordsource is set to .Null.
>
>I have a text field which will accept a user entry regarding the test to be done. Leaving this text box, the save button (for tests alone) gets focus. In teh click event, I have the following code:
>
>
INSERT INTO LabTestsDone (TestRef, testname, orderdate, healthnum, docnum, docname) ;
>	VALUES (mTestRef, mLabTest, mdate, mHealthNum, mDocnum, mDoctor)
>
>* Enables the save button
>thisform.command6.Enabled= .T.
>
>* Clears the contents of the text field to accept a new test entry
>thisform.text17.value = ""
>mLabTest = ""
>	
>* Get the data required to display in the grid
>select testname from LabTestsDone into cursor LabTestsInfo nofilter;
>	where LabTestsDone.OrderDate = mDate .AND.;
>		LabTestsDone.HealthNum = mHealthnum .AND.;
>		LabTestsDone.DocNum = mDocNum;
>	order by labtestsdone.testname
>
>thisform.grid1.refresh()
>
>The grid (base class) has only 1 column to display and the desired outcome is that each time a test is added and saved, the grid shold refresh to show the newly added test.
>
>The records are all saved properly, but I am unable to get the grid to display the results. The grid's properties RecordSource Type is set to Alias, and the Recordsource is set to LabTestInfo.
>
>Where am I going wrong? TIA.
>
>- Ravi
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform