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--