>John,
>after seeing this too many times we now write a method that sets the RecordSource of the grid and ControlSource of the columns in code. We call it after each time we do things with the underlying cursor. If, for example, the cursor is zapped or the filter causes no records to show the grid will simply show no data even if you set the filter back to show all recs. Be sure to call Thisform.Refresh() at the end of the method.
John,
If you zap the view or change the filter, simply take the focus off the grid, (go top if you want to) and then refresh(). I do not see the need of resetting the grid's RecordSource
>
>>I've tried that, but it's not working. I've placed that code in the Valid method for the textbox in which I'm entering the order # I want to search on, but nothing happens to the grid. I've also set up a command box and put it in the click event. Same result...or lack of result, I should say.
>>
>>Am I missing something?
>>
>>>>Hi all,
>>>>
>>>>I've got a form with a grid that is using a view as it's source. The grid shows (among other things) order_no, line_no, part_no, price. I've also got a textbox on the form to allow the user to enter the order # he wants to view. When I enter the order #, I want the grid to show only the records that apply to that order #. I've got it setting a filter and refreshing teh form after accepting the order # in the textbox, but the grid isn't refreshing. The rest of the form is, but not the grid.
>>>>
>>>>Any suggestions are greatly appreciated.
>>>>
>>>>Thanks!
>>>>
>>>>John
>>>
>>>How about:
>>>thisform.Grid.Refresh()
>>>after you set the filter.
Gregory