if mfindrefnumber <> 0 SELECT * from refdocswithaddress INTO CURSOR SpecificDoc nofilter; WHERE refdocswithaddress.number = mfindrefnumber mDocNum = SpecificDoc.Number mLastname = SpecificDoc.Last_name mFirstname = SpecificDoc.First_name mStatus = SpecificDoc.status mSpeciality = SpecificDoc.Speciality mAddress1 = SpecificDoc.ClinicAdd1 mAddress2 = SpecificDoc.ClinicAdd2 mLocation = SpecificDoc.Location mPostalCode = SpecificDoc.PostalCode mPhone = SpecificDoc.Phone mCell = SpecificDoc.CellNumber thisform.refresh() endifmfindrefnumber is returned from the form called
local mchnggridrecordsource mchnggridrecordsource = "" mchnggridrecordsource = thisform.grid1.recordsource thisform.grid1.recordsource = .NULL. select number,last_name,first_name,location,status ; from refdocswithaddress into cursor refdoclist nofilter ; where UPPER(refdocswithaddress.last_name) = mreflast_name count to klkl go top mfindrefnumber = refdoclist.number thisform.grid1.recordsource = mchnggridrecordsource thisform.grid1.refresh()And the actual number to be returned to the calling form is in the Click Event of the Grid's column.
mfindrefnumber = refdoclist.number Double Click Event has: mfindrefnumber = refdoclist.number thisform.release()Then the GotFocus Event shown above kicks in. I have been trying to see what the problem is. This is what I see happenning. Certain numbers are acknowledged by the GotFocus event by the cursor being populated with the selected record, while some numbers are'nt. I checked even the table structure. The field type is declared as and Integer.