meditprime = eval(thisform._grid2.column1.text1.controlsource) >meditsecond = eval(thisform._grid2.column2.text1.controlsource) >meditlocid =eval(thisform._grid2.column3.text1.controlsource) > >thisform._textbox4.refresh() >thisform._textbox5.refresh() >thisform._textbox6.refresh()>
SET DELETE ON > >delete from rev_locations; > where rev_locations.primaryloc = meditprime .and.; > rev_locations.secondloc = meditsecond .and.; > rev_locations.locationid = meditlocid > >thisform._textbox4.value = "" >thisform._textbox5.value = "" >thisform._textbox6.value = "" > >select * from rev_locations into cursor foundlocation; > where alltrim(rev_locations.primaryloc) = mfindloc .or.; > alltrim(rev_locations.secondloc) = mfindloc; > order by rev_locations.primaryloc > go top > >*!* Check to see if a match has been found > count to bbbb > if bbbb > 0 > thisform._grid2.visible = .T. > thisform._grid2.recordsource = "foundlocation" > thisform._grid2.column1.header1.caption = "Primary Location" > thisform._grid2.column2.header1.caption = "Secondary Location" > thisform._grid2.column3.header1.caption = "Location ID" > thisform._grid2.column1.width = 161 > thisform._grid2.column2.width = 198 > thisform._grid2.column3.width = 250 > go top > thisform._label3.visible = .F. > thisform._label5.visible = .T. > thisform._commandbutton3.caption = "Find" > thisform._commandbutton6.enabled = .F. > thisform.refresh() > else > thisform._grid2.visible = .F. &&Or put a form to tell the user > endif >thisform.refresh()>
.recordsource = "" *!* Redo your select *!* You can use _TALLY to see if the select returned records .recordsource = "foundlocation"And you won't have to rebuild your grid. Sorry if I've misunderstood your problem.