>Larry,
> Thanks for your help! However, this still does not seem to work. Can you actually move the record pointer if there are no records? If not, it would seem that I need to rethink my approach to view specific records.
>
>Thanks again for your help,
>Russell
I'm confused as to what exactly is going on.
You have a grid and an associated listbox. When you select a value in the listbox, you then apply a filter to the controlsource of the grid using SET FILTER TO. Some of the values in the listbox result in no records matches so the grid is blank.
If you use SET FILTER then issuing a SET FILTER TO removes the filter. Issuing a LOCATE will "move" the record pointer forcing the new filter condition to take effect. If there are records matching the filter condition, these will be displayed.
What may be missing is a refresh for the grid to force it to redisplay its controlsource. Try issuing a Grid.Refresh. If that doesn't work, you may have to issue a SetFocus as well.
lcfilterexpr = ["]+THISFORM.MyListBox.Value+["]
set filter to myfield = &lcfilterexpr
With MyGrid
.SetFocus()
.Refresh()
Endwith
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao